Saving records only with a button

  • Thread starter Thread starter Jake F
  • Start date Start date
J

Jake F

If I enter or change data on a record it automatically saves it, so if I
accidentally enter something I lose what should have been there. Is there a
way to only save the data that is entered or changed for a record if the save
button is pushed?
 
Access only actually saves the record to the database when you move to a
different record, a new record, or close the form. The easiest way to do
this is to put some code in the Form's Before Update event that will present
a message box to the user asking them to confirm the save:

If MsgBox("Save Changes to this Record", vbQuestion + vbYesNo) = vbNo Then
Cancel = True
Me.UnDo
End If

If the user clicks No, the update will not take place, and all values in the
record will be returned to their original value.
 

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