DoCmd Object.
The Quit method of the DoCmd object carries out the Quit action in Visual Basic. For more information on how the action and its arguments work, see the action topic.
DoCmd.Quit [options]
The Quit method uses the following arguments.
Argument |
Description |
options |
One of the following intrinsic constants: |
acPrompt | |
If you leave this argument blank, the default (acSaveYes) is assumed. |
The Quit method of the DoCmd object was added to provide backwards compatibility for running the Quit action in Visual Basic code in Microsoft Access version 7.0. It is recommended that you use the existing Quit method of the Application object instead.
This example displays a dialog box that asks if you want to save any changed objects before you quit Microsoft Access.
DoCmd.Quit acPrompt