Saving records only with a button

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?
 
K

Klatuu

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