In 2002, there are some nice collections that can be accessed from
CurrentProject and CurrentData.
CurrentData includes: AllQueries, AllTables
CurrentProject includes: AllForms, AllReports, AllMacros, AllModules,
AllDataAccessPages
Here is how to list all tables:
Public Sub ListTables()
Dim obj As AccessObject
With CurrentData
For Each obj in .AllTables
Debug.Print " " & obj.Name
Next obj
End With
End Sub
Public Sub ListModules()
Dim obj As AccessObject
With CurrentProject
For Each obj In .AllModules
On Error Resume Next
Debug.Print " " & obj.Name
Next obj
End With
End Sub