Quit Method (DoCmd Object) 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