create switchboard button that will close program entirely

R

robnsd

I have a switchboard button that closes the database but leaves Access
open. Is there a way I can have the button close the database and
Access with one click?
 
F

Fred Boer

Dear Markitos:

Open the switchboard form in design view.
Select the command button.
Press "Alt-Enter", or using the main menu choose View>Properties and click
on the "Event" tab.
Navigate to the "On Click" field - there should be "[Event Procedure]"
displayed in this field. Clicking into this field will reveal some ellipses
(...) on the right of the field.
Click on these.
The IDE code window will open, and you should be in a sub-routine.
I can't be sure what code will be there, but probably you will see the
following line:

docmd.close

Replace that line with "Docmd.quit".

Post back if you need more help!

Cheers!
Fred
 

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

Similar Threads


Top