Private Sub cmdCloseForm_Click()
'CHECKS TO SEE IF YOU WANT TO QUIT
strMsg = "Are you sure you want to close Application?"
If MsgBox(strMsg, vbQuestion + vbYesNo, "Quit Entry?") = vbYes Then
If Me.Dirty Then
Me.Undo 'should undo any changes to the current form.
End If
'Application.Quit
DoCmd.Close
Else
'IF NO, APPLICATION REMAINS OPEN
Cancel = True
End If
End Sub
VBCodes
Subscribe to:
Posts (Atom)
More Posts
Under Construction