Closing Access via Switchboard

  • Thread starter Thread starter bill
  • Start date Start date
B

bill

I am running Access 2000. On my switchboard, the last
item is exit, using the exit application option. When
this button is clicked, it closed the database, but
leaves Access running. Is there a way to get this button
to close the active database application, and close
Access?

Thanks
Bill
 
Hi Bill,

I'm guessing you are using the built-in Access Switchboard Manager. If you
are, we can easily make this work, 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.

Now when you press that "Exit" option on the form in normal view it should
close the database and Access as well.

That should do it.
Hope that helps,
Jeff Conrad
Bend, Oregon
 
Back
Top