Quit Method (Application Object) Example
The following example shows the Click event procedure for a command button named AppExit. After clicking the AppExit button, a dialog box prompts the user to save changes, and the procedure quits Microsoft Access.
Private Sub AppExit_Click()
Application.Quit acPrompt
End Sub