Sorry for the poor subjectline in the previous
Back for help.
This seems like a no-brainer but I am unsure how to implement.
I have the following code to prompt the user if the data had changed and to allow an opportunity to undo.
The code is in the "beforeupdate" event of my forms. Here is my problem. On forms with a list of records and record selectors, when I move between records the message box is fired. Where should I put the code so that the user is only promopted when he/she has made a change?
Thanks in advance - Bruce
Dim strMsg As String
strMsg = "Data has changed."
strMsg = strMsg & "@Do you wish to save the changes?"
strMsg = strMsg & "@Cick Yes to Save or No to Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?" = vbYes Then
Else
DoCmd.RunCommand acCmdUndo
End If
Back for help.
This seems like a no-brainer but I am unsure how to implement.
I have the following code to prompt the user if the data had changed and to allow an opportunity to undo.
The code is in the "beforeupdate" event of my forms. Here is my problem. On forms with a list of records and record selectors, when I move between records the message box is fired. Where should I put the code so that the user is only promopted when he/she has made a change?
Thanks in advance - Bruce
Dim strMsg As String
strMsg = "Data has changed."
strMsg = strMsg & "@Do you wish to save the changes?"
strMsg = strMsg & "@Cick Yes to Save or No to Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?" = vbYes Then
Else
DoCmd.RunCommand acCmdUndo
End If