If the button is on the main form, it is too late to UNDO changes in the
subform.
If you want to undo all changes to the main form and its subform(s), then
ONE solution is to use temporary work tables.
You must copy the current set of information from the "permanent" tables
into the temporary work tables, make changes (edits/adds/deletes) to records
in the work tables and when you are finished use the temporary work tables
to update the "permanent" tables.
If you want to UNDO the changes, then you simply discard the information in
the work tables. Otherwise, you will have to use logic to append, delete,
and update the main tables. This is not a simple task, but can be done.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..