cancel subform entry from parent form

  • Thread starter Thread starter mick
  • Start date Start date
M

mick

I'm trying to create a command button called "cancel" on
my parent form that will test the subform for "dirty" and
will undo unwanted changes to the data before it is
updated. But, when the button is clicked , the subform
loses focus and is updated and is no longer dirty. How
can I get around this?
 
That is a complicated question.
Remember, for the subform each record is a new form sorta
i.e if you update recordq and move to record 2, record1 is committed and
the form is no longer dirty.

So, How do you get around that problem?
On the main form's current event, copy the recordset of the subform into
another recordset or temp table.
If the user clicks the cancel button,
update all the subform records from the recordset and delete any new lines

HS
 
Back
Top