Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cancel changes in subform

Status
Not open for further replies.

tommeekers

Programmer
Sep 10, 2003
77
BE
I have a form which I use to edit data. This form also contains a subform with some more data, linked to the main form. On the main form I have the buttons "Save" and "Cancel".

When I press "Save", my data is saved and the form is closed. When I press "Cancel", all changes are cancelled and the form is closed. This works for the main form because I use Me.Undo before closing, but the changes in the subform are always saved. Any way to cancel those changes also ??
 
Perhaps:
[tt]Me.[Subform Control Name].Form.Undo[/tt]
 
I wish it was that simple.
But it seems as soon as I leave my subform (by pressing the button on my main form), the data on the subform gets saved. And I cannot undo saved changes with the Undo command.
 
Perhaps I should have mentioned that my subform is displayed as a datasheet. I'm adding / editing records directly on the datasheet.
 
Anyone found a solution for this yet ? I'm still having problems with it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top