Exiting Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to have the Exit database button on the switchboard exit
Access all the way, instead of just exiting the application? If not, is
there a programmatic way to do it?
 
Are you using the built-in Access Switchboard Manager?
And you want to have to have an option that closes all of
Access instead of just the database?

If so, this is easy to do but first make a back-up copy of
your database in case we screw up.

1. Open the Switchboard form in Design View.
2. Go to the code window for this form.
3. Go down to this area:

Private Function HandleButtonClick(intBtn As Integer)

Then look for this bit of code:

' Exit the application.
Case conCmdExitApplication
CloseCurrentDatabase

Change that code to this:

' Exit the application.
Case conCmdExitApplication
DoCmd.Quit

4. Compile the code and save the form.

5. Use the Switchboard Manager to create an option on your main page for
exiting. Select the command option that says "Exit Application." Press that
option on the form in normal view and it should close the database and
Access as well.

That should do it.
 
Back
Top