View Full Version : Cancel editing records


Danielf
04-06-2000, 08:04 AM
I have a form based on a simple query;
I am editing records in this form:
no problem.

But after having edited many records, I would
like to have the possibility to cancel all
what I have edited and returning to initial
situation.

Should I duplicate the query first and then modify the duplicated query?

Thanks for help

Daniel

R. Hicks
04-06-2000, 01:47 PM
Place a command button on you form, name it cmdCancel, add this code to the On Click event of the button:

Private Sub cmdCancel_Click()
Me.Undo
End Sub

This should do what you want.

HTH
RDH

Danielf
04-06-2000, 11:23 PM
I tried already this sub before but it didn' t work. My table is still changed.
This is the reason why I am trying to find something else.

I have found :
DoCmd.RunCommand acCmdUndo and it works

Daniel


[This message has been edited by Danielf (edited 04-07-2000).]