Allow additions with subform

I created a form which has “Allow new data” set to true, to only allow new records to be added. The form has three subforms. Adding new data to the “main part” of the form works fine, until I enter one of the subforms. Then the main form “locks” for further editing, only entering data in the subforms is possible.

I believe it is caused by creation of the record in the database for main part of the form, which is needed to bind the primary keys of the subforms in the database. This probably sets the flag that record on the form is not anymore “new”.

I believe the user should still be able to edit main part of the form after adding records in related subforms. Is there a way to achieve this (I am proficient in LO Basic)?

I found the answer. I also had “Allow changes” and “Allow deletions” flags on form set to “No”, which caused such behaviour. Changing the flags on these settings solved the problem.