Undo Help

clive2002

Registered User.
Local time
Today, 20:56
Joined
Apr 21, 2002
Messages
90
I have a form with 2 subform on a tab control.

I like my form very much as it is and im just adding a "Save and Exit" button and a "Exit without Saving".

Problem is that the Me.Undo won't work to reverse any changes if the user has moved focus to one of the subforms as any prior changes are saved. how can i get round this, i want the user to be able to focus on any of the controls including the subforms and i don't want them to have to decide on saving any changes until they want to exit the form??

Any help?
 
Not sure if this will help you, but you should call the Undo method on the subforms instead of on the main form like this:
Me.subformName.Form.Undo
 
You should use the forms (and subforms?) BeforeUpdate event and check if the record is Dirty. If true, then display a message box and ask the user if they want to save their changes or undo their changes. Your idea of only allowing the user to save or undo a record when exiting the form does not sound practical unless your form is set up to only display one record without the ability to navigate to another (or new) record.

HTH
 
You can't, the parent record is saved as soon as you move to a subform.
 

Users who are viewing this thread

Back
Top Bottom