Applying changes to record

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.
 
G

ghetto_banjo

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.
 
D

Daryl S

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.
 
G

ghetto_banjo

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top