Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / September 2007

Tip: Looking for answers? Try searching our database.

create switchboard button that will close program entirely

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
robnsd - 02 Sep 2007 21:39 GMT
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?
Fred Boer - 02 Sep 2007 22:03 GMT
Dear robnsd:

Try the following code:

DoCmd.Quit

HTH
Signature

Fred Boer - Amateur Access Enthusiast
Interests: Library software / Z39.50 / Web Services
Freeware Small Library Application available here:
http://www3.sympatico.ca/lornarourke/

>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?
Markitos - 21 Sep 2007 18:52 GMT
Where would the command go? >thanks-

> Dear robnsd:
>
[quoted text clipped - 6 lines]
> > open. Is there a way I can have the button close the database and
> > Access with one click?
Fred Boer - 21 Sep 2007 19:03 GMT
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

> Where would the command go? >thanks-
>
[quoted text clipped - 8 lines]
>> > open. Is there a way I can have the button close the database and
>> > Access with one click?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.