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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top