Code Examples

Quit Access

acCmdExit

This example closes Access completely. Access will prompt to save any unsaved changes.

To try this example out, create a button on a form and call it cmdExit. Put the  following code behind the On Click event.

'***************** Code Start *******************

Private Sub cmdExit_Click()
  RunCommand acCmdExit
End Sub

'****************** Code End ********************

© 1998 - 2011 Terry Wickenden TKW Design Site developed maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.