Go To Record Action

Sezzy

Registered User.
Local time
Today, 00:17
Joined
Nov 3, 2004
Messages
19
Hi all,

When using the go to record action to move to a blank record on a form. Is there a way to not save what the user has typed on the form when they press the button to take them to a blank record?

Thanks ;)
 
Save

In the Before Update Event of the form you can put something like this:

Dim strMsg As String
strMsg = "Data has been changed"
strMsg = strMsg & "Save this Record?"

If MsgBox(strMsg, vbYesNo, "") = vbYes Then
'do nothing
Else
DoCmd.RunCommand acCmdUndo
End If

When the record has been edited and the user closes the form or goes to a new or different record, a messagebox will pop up giving the user the option to save the changes, or not.
 

Users who are viewing this thread

Back
Top Bottom