Quit Database

A

Alex Hammerstein

Hi I have a close button which when pressed I want to give the user the
option to close the database and leave Access open, or close the database
and quit Access

IS this possible please - I can get the Application quit bit but not the
syntax to close the Database and leave Access open

Tks
 
B

BruceM via AccessMonster.com

Why not just use two command buttons? Presumably the user knows in advance
which option they want, so why make them click both the command button and a
message box?

That said, from what I can tell you can use Application.CloseCurrentDatabase
or Application.Quit, so you could present the user with a message box:

If MsgBox("Close Access? Click No to close just this database.", _
vbYesNo,"Make a Choice") = vbYes Then
Application.Quit
Else
Application.CloseCurrentDatabase
End If
 

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

Top