On Wed, 05 Jul 2006 17:31:33 GMT, RICHARD BROMBERG wrote:
I am writing a small application using Access 2000 and I am using a
Switchboard.
The last item in the switchboard is to be used to close the application..
I selected Exit Application from the dropdown list of functions and it does
close the application, but it leaves Access open.
What I want to do is exit the application and close Access.
I can do this (exit the application and close Access) by using a command
button. The code for this command button is :
Private Sub cmdQuit_Click()
DoCmd.Quit
End Sub
Can I set up the last item in the switchboard to work the same way?
Thanks
You're using the built-in Access switchboard?
One of the problems with it is that it's set up according to what the
switchboard manager designer thinks you should do, not according to
what it is you want to do.
Open the switchboard in design view.
Click on View + Code
Find the following 2 lines of code in the HandleButtonCli ck function:
Case conCmdExitAppli cation
CloseCurrentDat abase
Change it to:
Case conCmdExitAppli cation
DoCmd.Quit
Save and exit.
You might want to consider creating your own switchboard, using an
unbound form with command buttons.
You'll have more control over it's appearance and versatility.
Up-keep will be easier also.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail