By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,640 Members | 2,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,640 IT Pros & Developers. It's quick & easy.

On Exit Message

P: 1
Hi can anybody help?

I'm currently working on a project within access 2000, I'm wanting to create an on exit message, but I'm struggling.

The message I want to read is "Are you sure you wish to exit" with a yes and no option.

When I've tried all option just exit and I only want to do this when I click yes and if click no to cancel the event.

If someone could kindly help me with with macro I would be grateful.

Many Thanks
Nov 16 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 3,532
Exit what? Textbox, a form, Access itself?

Welcome to Bytes!

Linq ;0)>
Nov 16 '08 #2

Expert 2.5K+
P: 3,072
I assume you have an Exit button, this will need in the OnClick event the code:
Expand|Select|Wrap|Line Numbers
  1. if msgbox("Are you sure you wish to exit",vbYesNo) = vbYes then
  2.   DoCmd.Quit
  3. endif
Nov 16 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.