Don't save changes to a record

Tammy

Registered User.
Local time
Today, 20:51
Joined
Mar 29, 2000
Messages
14
How do I code a Cancel button?? I want to close a form which is bound to a table or a query but I don't want to save changes. I have tried the following code but it doesn't work:
Docmd.Close acForm, "frmGeneral", acSaveNo.
CAN ANYONE HELP?
 
As long as the record hasn't been saved already by some other action, you can use the Undo command (me!undo) before closing the form. This restores the 'oldvalues' to the controls.

Me.undo
docmd.close
 

Users who are viewing this thread

Back
Top Bottom