can i print a list of my tables, queries, forms and reports easily

  • Thread starter Thread starter James
  • Start date Start date
J

James

I am working on a database that has about 100 tables,
forms, queries and reports. I need an easy way to be able
to print out a list of them all. Does anyone have any
solutions here.
cheers
James
 
James said:
I am working on a database that has about 100 tables,
forms, queries and reports. I need an easy way to be able
to print out a list of them all. Does anyone have any
solutions here.
cheers
James

Have a look at what Tools -> Analyze -> Documenter will give you. Note
that you can choose how much detail you get about each type of object.
 
Assuming Access 2000 or later (CurrentProject, CurrentData and AccessObject
were new in that version) ...

Public Sub PrintObjNames(ByVal strFileName As String, Optional boolOverWrite
As Boolean, _
Optional ByVal boolSysTables As Boolean)

Dim intFile As Integer
Dim aob As AccessObject

intFile = FreeFile
If boolOverWrite Then
Open strFileName For Output As intFile
Else
Open strFileName For Append As intFile
End If
Print #intFile, "Data Access Pages"
For Each aob In CurrentProject.AllDataAccessPages
Print #intFile, aob.Name
Next aob
Print #intFile, ""
Print #intFile, "Forms"
For Each aob In CurrentProject.AllForms
Print #intFile, aob.Name
Next aob
Print #intFile, ""
Print #intFile, "Macros"
For Each aob In CurrentProject.AllMacros
Print #intFile, aob.Name
Next aob
Print #intFile, ""
Print #intFile, "Modules"
For Each aob In CurrentProject.AllModules
Print #intFile, aob.Name
Next aob
Print #intFile, ""
Print #intFile, "Reports"
For Each aob In CurrentProject.AllReports
Print #intFile, aob.Name
Next aob

'Note - queries and tables collections are members of CurrentData,
'not CurrentProject. CurrentData also contains other collections
'(AllViews, AllStoredProcedures) which are relevent to ADPs.

Print #intFile, ""
Print #intFile, "Queries"
For Each aob In CurrentData.AllQueries
Print #intFile, aob.Name
Next aob
Print #intFile, ""
Print #intFile, "Tables"
For Each aob In CurrentData.AllTables
If UCase(Mid$(aob.Name, 2, 3)) <> "SYS" Or boolSysTables Then
Print #intFile, aob.Name
End If
Next aob
Close #intFile

End Sub
 
Back
Top