View Full Version : Canceling updates of a form


MikeAngelastro
02-08-2002, 10:05 PM
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

Rich
02-08-2002, 11:56 PM
Have you tried Me.Undo
DoCmd. Close etc

golgo1
02-09-2002, 12:16 AM
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