Applying changes to record

  • Thread starter Thread starter Colorado
  • Start date Start date
C

Colorado

Is there any way in Access 2003 to apply any edits to a record or entry of a
new record only when a user clicks on a button? Like when you edit a
document, changes aren't applied to the document file unless you click save
or save as.
 
i usually get around this by turning off the Close X button in the
form properties, and the making my own button for Cancel/Close that
uses the Undo Record change command. that way they are forced to
either click save, or click cancel and are not able to simply close
the form by clicking the X.
 
Colorado -

You can put code in the 'BeforeUpdate' event. You can create a form
variable to track whether the button has been clicked or not. This would
normally be a hidden unbound variable. The value should be set to False
whenever the form is opened or a record changed. You set it True only when
the button is clicked.

Then in the BeforeUpdate event, if this variable is false, you set 'Cancel'
to true. Otherwise you set the new variable back to false and the Save will
happen.

That is one high-level approach. Check it out.
 
i don't allow that either :-)

i found a function that disables the mouse wheel in access while the
form is open. works well in this particular database as the user
doesnt really need to cycle through multiple records.
 
Back
Top