Undo

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

Can anyone advise how to "Undo" subform?

My parent form "undoes" quite nicely, but the subforms do
create a record in their respective tables as well as
inhibit the true undo of the parent.

I appreciate any and all help.
Greg
 
How are you calling the undo? Do you have a custom button that is doing a
"Me.Undo"?

If so you may need to set focus to each of the subforms and perform an undo
on each one and then on the parent form. Start fromt he 'deepest' subnforma
nd work your way up to the parent.

I have found setting focus to suboforms can be a hassle at first. In some
cases I have needed to set focus first to the subform and then to a control
on the subform before I truly get focus on the subform. Refer here for
proper syntax http://www.mvps.org/access/forms/frm0031.htm

Tony
 
Can anyone advise how to "Undo" subform?
My parent form "undoes" quite nicely, but the subforms do
create a record in their respective tables as well as
inhibit the true undo of the parent.

Once the focus has moved from main form to subform, the main form record has
been saved (there may be exceptions to this rule, apparently, but this is what
is supposed to happen) and the "Undo" action becomes unavailable. The same thing
happens when moving from a subform to the main form (same possible exceptions
may apply) so, again, the "Undo" action becomes unavailable. "Undo" is only
available while a record is "dirty" (edits have been made that have not yet been
committed to the table).

In other words, you must "Undo" a form *before* the form's "AfterUpdate" event
has occurred, and that means *before* the focus has moved from main form to
subform or subform to main form.
 
Back
Top