Cancel editing records

Danielf

Registered User.
Local time
Today, 14:22
Joined
Feb 21, 2000
Messages
103
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
 
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
 
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).]
 

Users who are viewing this thread

Back
Top Bottom