Exit button

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

would like anexit button that bring up a message box to ask if i am
sure i want to exit

Can any give me the code


tAhnks


Simon
 
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

Barry
 

Ask a Question

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.

Ask a Question

Back
Top