ljoekelsoey4
Registered User.
- Local time
- Today, 08:10
- Joined
- Mar 16, 2017
- Messages
- 49
Getting the above error very intermittently from users. Occuring when users click 'Save and Close', there is also no save close button. I'm unable to replicate the error on my end. 

Code:
Private Sub cmdClose_Click()
Dim Response As Integer
Response = MsgBox(Prompt:="Do you want to save this record?", buttons:=vbYesNo)
If Response = vbYes Then
Me.EventEntryDate = Me.datetoday
Me.EventEntryTime = Me.timenow
MsgBox "Saved"
DoCmd.Close
Exit Sub
Else
MsgBox "Changes have been cancelled"
Cancel = True
Me.Undo
DoCmd.Close
Exit Sub
End If
End Sub
Private Sub cmdCloseNoSave_Click()
Dim Response As Integer
Response = MsgBox(Prompt:="This record will not be saved. Are you sure you want to close?", buttons:=vbYesNo)
If Response = vbYes Then
Cancel = True
Me.Undo
DoCmd.Close
Exit Sub
Else
Cancel = True
End If
End Sub