Hello,
I'm using a switchboard command to close a database, but Access 2000 remains open. Is there a VBA command I can execute instead that will close both the database and Access?
Thanks.
Printable View
Hello,
I'm using a switchboard command to close a database, but Access 2000 remains open. Is there a VBA command I can execute instead that will close both the database and Access?
Thanks.
Either of these two lines will close the db and close Access. You can change the last parameter to either prompt to save,
dont save, or save without prompting.
VB Code:
Application.DoCmd.Quit acQuitSaveNone '(Or acQuitSaveAll, or acQuitPrompt) 'Or Application.Quit acQuitSaveNone '(Or acQuitSaveAll, or acQuitPrompt)
That works perfectly. Thanks RobDog888.
No prob. :)
Since we are closing the application first it gives us the options on saving changes to the db objects, etc. If we closed the db first
(usual way people do it) you loose all abilities to control the application, thus not able to close the app too. ;)