Regarding the Me.Undo to revert back to the original record entry, what if you are working with a subform in a form. How do you undo the record of the subform?
Reply from Richard Rost:
Me is just a reference to the current form, so if your FOCUS is currently IN the subform, you would still say: Me.Undo.
If you're in the PARENT form and you want to cancel the editing of the record in the subform, you could say:
MySubform.Form.Undo
However, as soon as you leave the record in the subform and click on the parent form, the data is saved, so you can't use this method. It would only work if you were programmatically modifying the data in the subform from VBA code in the parent. Make sense?
Remember, you can also refer to forms by their FULL names:
One form: Forms!FormName!FieldName Subforms: Forms!ParentForm!SubForm.Form!FieldName
To access their Undo methods:
One form: Forms!FormName.Undo Subforms: Forms!ParentForm!SubForm.Form.Undo
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.