Applies To DoCmd object.
Description
The Quit method of the DoCmd object carries out the Quit action in Visual Basic. For more information on how the action and its argument work, see the action topic.
Syntax DoCmd.Quit [options] The Quit method has the following argument.Argument | Description |
options | One of the following intrinsic constants: |
acQuitPrompt acQuitSaveAll (default) acQuitSaveNone | |
If you leave this argument blank, the default constant (acQuitSaveAll) is assumed. |
Remarks 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's recommended that you use the existing Quit method of the Application object instead.
See Also Close method, Quit action, Quit method (Application object), Save method.
Example The following example displays a dialog box or dialog boxes that ask if you want to save any changed objects before you quit Microsoft Access:DoCmd.Quit acQuitPrompt