Undo all changes to form and subform (1 Viewer)

brampeirs

Registered User.
Local time
Today, 01:36
Joined
Jul 29, 2011
Messages
20
Hello,

I have been looking for this for a while. I have some forms where I can cancel my input. However this works only on the current record. When I implement a subform this does not work anymore. Because access auto saves when focus is set to the subform.

I don't wan't to use unbound forms. What I would like to do is when I press EDIT that a snapshot or something is taken of the current values. So I can set them back.

I can use variables for the main form, but I don't know how to save the values of the records of the subform.

Or does the possibility exist to use transactions?

I just want to be able to undo all changes regardless of the subforms.

Thank you!!!!!
 

EternalMyrtle

I'm still alive
Local time
Yesterday, 16:36
Joined
May 10, 2013
Messages
533
You may need to put an undo button on the subform itself (easy option) or you could program the main undo button to also clear the data in the subform.
 

EternalMyrtle

I'm still alive
Local time
Yesterday, 16:36
Joined
May 10, 2013
Messages
533
Also, to get around the problem of someone entering data in a subform before making a real record in the main form, I will sometimes hide my subform until certain crucial data in the main form is filled in. At that point, it is a real record and the subform can become visible again.

Does this make sense?
 

brampeirs

Registered User.
Local time
Today, 01:36
Joined
Jul 29, 2011
Messages
20
Thank you for your responses.

@EternalMyrtle, I think that's a good approach, I hide the subform too.

For now I've made it that it will only undo changes of the main form. So at least that side always works. :)
 

Users who are viewing this thread

Top Bottom