Quit Method (Application Object)

Quit Method (Application Object)

See Also         Example         Applies To

The Quit method quits Microsoft Access. You can select one of several options for saving a database object before quitting.

Syntax

Application.Quit [option]

The Quit method has the following argument.

Argument Description
option An intrinsic constant that specifies what happens to unsaved objects when you quit Microsoft Access. This argument can be any of the following constants.
  Constant Description
  acSaveYes (Default) Saves all objects without displaying a dialog box.
  acPrompt Displays a dialog box that asks whether you want to save any database objects that have been changed but not saved.
  acExit Quits Microsoft Access without saving any objects.

Remarks

The Quit method has the same effect as clicking Exit on the File menu. You can create a custom menu command or a command button on a form with a procedure that includes the Quit method. For example, you can place a Quit button on a form and include a procedure in the button's Click event that uses the Quit method with the option argument set to acSaveYes.