On Tue, 25 Nov 2008 13:32:01 -0800, Kelly wrote:
[Quoted Text] > 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.
-- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com
|