Switchboard manager

J

Jeff Conrad

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.

And maybe soon you'll be able to use my Advanced Switchboard Manager Add-In and not have to worry
about this at all!
 
R

R

Ok Im kind of a newb and i can get it into the design view but where exactly
is the code window of the form??

R
 
J

Jeff Conrad

No problem.
Lost of ways to do this, but again make sure you have a backup first of your database.
Once you have the Switchboard Form in Design View, go up to the main menu bar and look for the
option "View." Click there and then from the list that drops down choose "Code." This will take you
to the code window for this form. Then follow the previous instructions to make the change.
 
R

R

It worked thank you very much!

R

Jeff Conrad said:
No problem.
Lost of ways to do this, but again make sure you have a backup first of your database.
Once you have the Switchboard Form in Design View, go up to the main menu bar and look for the
option "View." Click there and then from the list that drops down choose "Code." This will take you
to the code window for this form. Then follow the previous instructions to make the change.
 
Top