Can I print a list of all reports in a database? If so, how?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I print a complete listing of all the reports in a database? If so, how
do I do it? I tried documenter but I just want a list of all the reports and
nothing else.

Please advise. Thank You.
 
Assuming Access 2000 or later ...

Public Sub PrintReports()

Dim strFile As String
Dim intFile As Integer
Dim aob As AccessObject

strFile = CurrentProject.Path & "\reports.txt"
intFile = FreeFile

'This will delete any existing file of the same name.
'Make sure you don't have anything important with
'this name in the same folder as your MDB.
Open strFile For Output As intFile
For Each aob In CurrentProject.AllReports
Print #intFile, aob.Name
Next aob
Close #intFile

End Sub

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Back
Top