-
Help with
okay I have this code which will undo changes if user click "no"..
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String
strMsg = "Data has changed."
strMsg = strMsg & "Do you wish to save the changes?"
strMsg = strMsg & "Click Yes to Save or No to Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?") = vbYes Then
'do nothing
Else
DoCmd.RunCommand acCmdUndo
---------------
what I want is instead of undo the changes that it stays in that same record so that the user can continue editing as needed and then save again.
Is this possible?
Many thanks,
Marilia
-
You are given a Cancel flag at the procedure start: Form_BeforeUpdate(Cancel As Integer)
else
cancel = true 'to cancel the edits
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules