Choose a Database Tab
acCmdViewDataAccessPages, acCmdViewForms, acCmdViewMacros, acCmdViewModules, acCmdViewQueries, acCmdViewReports, acCmdViewTables
This code makes the database window display the required tab. It would probably be easier just to use DoCmd.SelectObject.
'***************** Code Start *******************
' Code by Terry Wickenden
Sub ShowDatabasePage(strPage As String)
Dim intCommand As Integer
DoCmd.SelectObject acTable, , True
Select Case LCase(strPage)
Case "table"
intCommand = acCmdViewTables
Case "query"
intCommand = acCmdViewQueries
Case "form"
intCommand = acCmdViewForms
Case "report"
intCommand = acCmdViewReports
Case "macro"
intCommand = acCmdViewMacros
Case "module"
intCommand = acCmdViewModules
Case "page"
intCommand = acCmdViewDataAccessPages
Case Else
'not a valid argument passed
Exit Sub
End Select
DoCmd.RunCommand intCommand
End Sub
'****************** Code End ********************