Code Examples

Display Object Browser

acCmdObjectBrowser

Displays the Object Browser window even if there is no module open. Replace zzTestCode with the name of a module that exists in the database. Put the following code behind a button called cmdObjOpen.

'***************** Code Start *******************
'Code by Terry Wickenden

Sub cmdObjBrowser_Click()
  On Error Resume Next
  'Just ignore any error
  Application.Echo False
  DoCmd.OpenModule "zzTestCode"
  DoCmd.RunCommand acCmdObjectBrowser
  DoCmd.SelectObject acModule, "zzTestCode"
  DoCmd.Close
  Application.Echo True
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.