Automatically Saving Data Changes

  • Thread starter Thread starter Becca
  • Start date Start date
B

Becca

Is there any way to turn off the feature in Access that
saves our changes once we move to a different field? If
not, can they be undone? I noticed the Edit/Undo
function. Is this the only way? How far back does the
undo function go? TIA!!!
Rebecca
 
Becca

Just to be sure I'm understanding this correctly, you don't want to save
when you move to a different field or a different record?

If its moving from field to field, is this a case where you are moving from
a Main Form to a Sub Form (or vice-versa)?

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Access saves the current record whenever to cycle past the end of the
record, move to another record, apply a filter, change the sort order,
reassign the recordsource, close the form, press Shift+Enter, choose
SaveRecord from the Records menu, close Access, etc, etc.

Before it saves the record, the form's BeforeUpdate event fires. This is the
only reliable way to catch all those situations.

For example, if you would like confirmation to save the changes or undo the
form, you could put this code into the Event Procedure:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Save?", vbYesNo) <> vbYes Then
Cancel = True
Me.Undo
End If
End Sub
 
One of the undo functions is to undo record. As long as
you do not move to a new record this will work

Jim
 
Back
Top