Waiting to save Main form data until Subform is complete

K

Kelly

Hello - I have a main form that creates a manufacturing batch, then a subform
that establishes the first transaction in the batch. I do not want a batch
established unless a transaction is attached. Additional transactions would
then be added to the batch through a different Batch Transaction Add form.

Currently, when I tab through the fields and enter the appropriate data the
batch is created automatically when I am done entering that data. If there
is an error during the First Transaction entry, the entry bombs out and
closes but I still have the batch established improperly.

Is there any way to stop the main form data from saving until I finish
entering the subform data and all data is appropriately entered?

Thanks in advance for your help with this. - Kelly
 
R

Rick Brandt

Hello - I have a main form that creates a manufacturing batch, then a
subform that establishes the first transaction in the batch. I do not
want a batch established unless a transaction is attached. Additional
transactions would then be added to the batch through a different Batch
Transaction Add form.

Currently, when I tab through the fields and enter the appropriate data
the batch is created automatically when I am done entering that data.
If there is an error during the First Transaction entry, the entry bombs
out and closes but I still have the batch established improperly.

Is there any way to stop the main form data from saving until I finish
entering the subform data and all data is appropriately entered?

Thanks in advance for your help with this. - Kelly

Not with bound forms no. Usually referential integrity between the two
tables is enforced and that would dictate that the parent record must
exist before a child record can be added. Because of that the design of
a form/subform is such that the main record is saved as soon as you move
focus to a subform.
 

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