update record

  • Thread starter Thread starter bb
  • Start date Start date
B

bb

How to prevent records to be updated except click the 'save' button ? i.e.
Click 'previous' and 'next' will cancel update of all current input.
 
Use the form's BeforeUpdate event to cancel the update if your requirements
haven't been met.

Example:
If Msgbox("Save Changes?", vbQuestion + vbYesNo, "Save") = vbNo Then
Cancel = True
End If

If you desire, you could change the Msgbox to a form level variable that you
set the value of in the click event of your button and check for that value.
If the value isn't what it should be, then Cancel the update. However, this
will also keep the record from moving to the previous or next record. To
make the move, the user will need to Undo the changes. Pressing the Esc key
twice will accomplish this.
 

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

Back
Top