

To run the QuitAccess action in a Visual Basic for Applications (VBA) module, use the Quit method of the DoCmd object. You can use the Save action in a macro to save a specified object without having to quit Access or close the object. If you have any unsaved objects and attempt to exit Access, the dialog boxes that appear are the same as those displayed when you use Prompt for the Options argument of the QuitAccess action.


This form could have a Quit button that runs a macro containing the QuitAccess action with the Options argument set to Save All. For example, you might have a master form that you use to display the objects in your custom workspace. You can use this action to quit Access without prompts from Save dialog boxes by using a custom menu command or a button on a form. The QuitAccess macro action can also specify one of several options for saving database objects prior to exiting Access. The default is Save All.Īccess doesn't run any actions that follow the QuitAccess action in a macro. You can use the QuitAccess macro action to exit Access. Click Prompt (to display dialog boxes that ask whether to save each object), Save All (to save all objects without prompting by dialog boxes), or Exit (to quit without saving any objects) in the Options box in the Action Arguments section of the Macro Builder pane. Specifies what happens to unsaved objects when you quit Access. The QuitAccess action has the following argument. Note: Beginning in Access 2010, the Quit macro action was renamed to QuitAccess.
