Code Examples

Open Options Dialog

acCmdOptions

This example opens the Options dialog box (available by clicking Options on the Tools menu). The function returns true if the Options dialog opens else it returns false. To use the code, paste the code into a module and then test the result of the function in the routine where you want the open the Options dialog.

'***************** Code Start *******************
'Code from Microsoft Access Help

Function OpenOptionsDialog() As Boolean

  On Error GoTo Error_OpenOptionsDialog

  DoCmd.RunCommand acCmdOptions
  OpenOptionsDialog = True

Exit_OpenOptionsDialog:

  Exit Function

Error_OpenOptionsDialog:

  MsgBox Err & ": " & Err.Description
  OpenOptionsDialog = False
  Resume Exit_OpenOptionsDialog

End Function

'****************** 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.