Canceling updates of a form

MikeAngelastro

Registered User.
Local time
Today, 05:34
Joined
Mar 3, 2000
Messages
254
Hi,

I need to allow users to change their minds after they had changed the data in a field by pressing a cancel button that closes a form without updating or adding a record. Set the cancel property of a command button isn't enough. I have five very popular books on Access and, surprisingly, not a single one of them gives an adequate explanation of how to do this. Some mention set the "cancel" variable into the before update function but stop there.

Any help?

Mike
 
As long as the record hasn't been saved yet, you can use the
DoCmd.Close acForm, "formname", acSaveNo
or use the acSavePrompt option to prompt the user to save yes/no/cancel
 

Users who are viewing this thread

Back
Top Bottom