prevent subform data until main form has data

D

deb

I have a form (tProject) with a subform (tDeliverable).

How can I prevent the subform from having data entered before the main form
has data?

Currently. If user skips the data in the main form and just enters the data
in the subform, the data does not have the IDs linked. When user tries to
find the record, he/she is unable because the main form ID was never created,
only the subform ID was.

what is the best way to handle this?
 
R

Rick Brandt

I have a form (tProject) with a subform (tDeliverable).

How can I prevent the subform from having data entered before the main
form has data?

Currently. If user skips the data in the main form and just enters the
data in the subform, the data does not have the IDs linked. When user
tries to find the record, he/she is unable because the main form ID was
never created, only the subform ID was.

what is the best way to handle this?

I generally hide or lock the subform in the Current event and then show/
unlock it in the main form's BeforeInsert event.
 
T

TedMi

In the Current event, lock/hide the subform only if the main form is in data
input mode. Otherwise, users will be unable to make changes to subforms of
existing records.
-TedMi
 
Top