L
Luisa
Hello,
When YES is used in the below window, the form saves the information and
closes itself.
When NO is used, an error message tells me that some is wrong with
'DoCmd.RunCommand acCmdUndo' but I don't see the problem.
Can someone help?
TIA
Luisa
---------------------------------------------
Private Sub Command21_Exit(Cancel As Integer)
Dim strMsg As String
strMsg = "Ha hecho cambios."
strMsg = strMsg & " ¿Desea guardar los campos?"
'strMsg = strMsg & "@Click Yes to Save or No to Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, "¿Guardar cambios?") = vbYes
Then
'do nothing
Else
DoCmd.RunCommand acCmdUndo
End If
End Sub
When YES is used in the below window, the form saves the information and
closes itself.
When NO is used, an error message tells me that some is wrong with
'DoCmd.RunCommand acCmdUndo' but I don't see the problem.
Can someone help?
TIA
Luisa
---------------------------------------------
Private Sub Command21_Exit(Cancel As Integer)
Dim strMsg As String
strMsg = "Ha hecho cambios."
strMsg = strMsg & " ¿Desea guardar los campos?"
'strMsg = strMsg & "@Click Yes to Save or No to Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, "¿Guardar cambios?") = vbYes
Then
'do nothing
Else
DoCmd.RunCommand acCmdUndo
End If
End Sub