how to close access window

  • Thread starter Thread starter Song SU
  • Start date Start date
S

Song SU

how to i automactically close access window after i exit switchboard?
 
in message:
how to i automactically close access window after i exit switchboard?

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.
 

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


Back
Top