Turn off messages

E

emmy

I used this code to turn the confirmation messages back
on when you click a button named Exit on a form. I also
need to turn the messages back on if they close the
database using the X button at the top of the screen. Can
anyone tell me how to do this on exit of the entire
database?
Thanks!!!

Private Sub cmdExit_Click()
On Error GoTo Err_cmdExit_Click

Application.SetOption ("Confirm Record Changes"), True
Application.SetOption ("Confirm Document Deletions"), True
Application.SetOption ("Confirm Action Queries"), True

DoCmd.Quit

Exit_cmdExit_Click:
Exit Sub

Err_cmdExit_Click:
MsgBox Err.Description
Resume Exit_cmdExit_Click

End Sub
 

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

Top