If MsgBox("Are you sure you want to exit", vbOKCancel + vbQuestion, "Confirm
Exit") = vbOK Then
DoCmd.Close 'This closes the form. If you want to exit Access, use
the next line instead.
Quit
End If
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.