Link to home
Start Free TrialLog in
Avatar of Michael Paravicini
Michael ParaviciniFlag for Chile

asked on

Exiting Form/Subform without saving underlying data

I have a form and a subform and I need to  be able to
- a) save data from both forms (easy - default by access)
- b) exit both forms without saving any of the data (do I need to save first and then delete both records??)
- c) exit both forms and restore previous values of both forms (no clue how to achieve this easy?)

Thank you for any help on b or c ..
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you must have the ability to rollback both the main and subforms, then the temp table method is what I use.

I also use the Form_BeforeUpdate (of both the main and subform) to ensure that required fields are all filled in before the user is allowed to save date in either of those forms.  You can also use the Exit event (it has a Cancel argument) of the subform control to ensure that required fields in the subform have been filled in before allowing the user to set the focus outside the subform.