I have a switchboard button that closes the database but leaves Access
open. Is there a way I can have the button close the database and
Access with one click?
|
|
0
|
|
|
|
Reply
|
robnsd
|
9/2/2007 8:39:17 PM |
|
Dear robnsd:
Try the following code:
DoCmd.Quit
HTH
--
Fred Boer - Amateur Access Enthusiast
Interests: Library software / Z39.50 / Web Services
Freeware Small Library Application available here:
http://www3.sympatico.ca/lornarourke/
"robnsd" <robnsd@sbcglobal.net> wrote in message
news:1188765557.922703.326790@19g2000hsx.googlegroups.com...
>I have a switchboard button that closes the database but leaves Access
> open. Is there a way I can have the button close the database and
> Access with one click?
>
|
|
0
|
|
|
|
Reply
|
Fred
|
9/2/2007 9:03:38 PM
|
|
Dear Markitos:
Open the switchboard form in design view.
Select the command button.
Press "Alt-Enter", or using the main menu choose View>Properties and click
on the "Event" tab.
Navigate to the "On Click" field - there should be "[Event Procedure]"
displayed in this field. Clicking into this field will reveal some ellipses
(...) on the right of the field.
Click on these.
The IDE code window will open, and you should be in a sub-routine.
I can't be sure what code will be there, but probably you will see the
following line:
docmd.close
Replace that line with "Docmd.quit".
Post back if you need more help!
Cheers!
Fred
"Markitos" <Markitos@discussions.microsoft.com> wrote in message
news:02826F11-C3B1-4C5A-8003-C9071FC7E0C2@microsoft.com...
> Where would the command go? >thanks-
>
> "Fred Boer" wrote:
>
>> Dear robnsd:
>>
>> Try the following code:
>>
>> DoCmd.Quit
>>
>> HTH
>> --
>> Fred Boer - Amateur Access Enthusiast
>> Interests: Library software / Z39.50 / Web Services
>> Freeware Small Library Application available here:
>> http://www3.sympatico.ca/lornarourke/
>>
>>
>> "robnsd" <robnsd@sbcglobal.net> wrote in message
>> news:1188765557.922703.326790@19g2000hsx.googlegroups.com...
>> >I have a switchboard button that closes the database but leaves Access
>> > open. Is there a way I can have the button close the database and
>> > Access with one click?
>> >
>>
>>
>>
|
|
0
|
|
|
|
Reply
|
Fred
|
9/21/2007 6:03:00 PM
|
|