Here is an extract of code which will fill a listbox with object names
Private Sub Form_Load()
Dim accObject As Access.AccessObject
'Fill with Tables
For Each accObject In CurrentData.AllTables
Me.listObjects.AddItem "TABLE;" & accObject.Name
Next
'If currently opened file is an Access database (mdb), then fill
'with queries.
'Otherwise, if it is an Access project (adp), fill with views,
'stored procedures, database diagrams, and functions.
If CurrentProject.ProjectType = acMDB Then
For Each accObject In CurrentData.AllQueries
Me.listObjects.AddItem "QUERY;" & accObject.Name
Next
Else
For Each accObject In CurrentData.AllViews
Me.listObjects.AddItem "VIEW;" & accObject.Name
Next
For Each accObject In CurrentData.AllStoredProcedures
Me.listObjects.AddItem "PROCEDURE;" & accObject.Name
Next
For Each accObject In CurrentData.AllDatabaseDiagrams
Me.listObjects.AddItem "DIAGRAM;" & accObject.Name
Next
For Each accObject In CurrentData.AllFunctions
Me.listObjects.AddItem "FUNCTION;" & accObject.Name
Next
End If
'Fill list with forms.
For Each accObject In CurrentProject.AllForms
Me.listObjects.AddItem "FORM;" & accObject.Name
Next
'Fill list with reports.
For Each accObject In CurrentProject.AllReports
Me.listObjects.AddItem "REPORT;" & accObject.Name
Next
'Fill list with data access pages.
For Each accObject In CurrentProject.AllDataAccessPages
Me.listObjects.AddItem "PAGE;" & accObject.Name
Next
'Fill list with macros.
For Each accObject In CurrentProject.AllMacros
Me.listObjects.AddItem "MACRO;" & accObject.Name
Next
'Fill list with modules.
For Each accObject In CurrentProject.AllModules
Me.listObjects.AddItem "MODULE;" & accObject.Name
Next
End Sub