Cancelling changes in a form - MS Access 2003

soorags

Registered User.
Local time
Today, 08:11
Joined
Mar 19, 2007
Messages
37
On the form frmNz2 of my database, how can I make the Back button cancel any changes made to the information in the Search Results table after it has been editted? When I edit the information in the table and then press back, when the form is re-entered the changes stay. I would like these changes to be cancelled when pressing the Back button so that when the form is re-entered the table is the same as before changes were made. I have attached the database and would be grateful for any help. Thank you.

PS - I have tried changing the Back button's macro option to No where it says if you would like the button to save changes when pressed.
 

Attachments

Disclaimer: I've not had a look at your database as I am currently in work and don't have Access available.

There is an option on one of the properties tabs for command buttons that has Yes/No options, I think it is called Cancel. If you set this to Yes then I believe that activating the button also causes 'cancel' effects on the record.

If that doesn't work you could create an actual cancel button on your form, then copy the (I think) single line of code that cancels/rolls back (uncommitted) changes into the code for your 'back' button. Then just delete the cancel button.

HTH

Tim
 
can you not detect the back key in the key press event and execute a me.undo
 

Users who are viewing this thread

Back
Top Bottom