I want cancel as default

  • Thread starter Thread starter Dave Cullen
  • Start date Start date
D

Dave Cullen

When a user opens a form and has a record open, the default action for
Access is to update the record when the form closes. I want to change
that default behavior to abort or cancel rather than update. I need that
behavior to be the default even if the user closes the window.
Basically, I want the record updated only if the user presses the "Save"
button that I provided.

Can this be done?

Thanks
 
Dave

One way to do this is to add a variable (boolean, T/F) in the code behind
the form. This variable is set to "True" only by code in your <Save> button
code. In the form's BeforeUpdate event, check to see if the blnOKtoSave
variable is "True". If it is, proceed... if it isn't, cancel.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top