Identify all reports

  • Thread starter Thread starter Doug
  • Start date Start date
D

Doug

Obviously there are table, query and form collections within access which
can easily be iterated but has anyone found a way to do this with reports? I
am still unsure why Microsoft has never included reportdefs.

Any insight would be appreciated, thanks in advance.
 
Doug said:
Obviously there are table, query and form collections within access which
can easily be iterated but has anyone found a way to do this with reports? I
am still unsure why Microsoft has never included reportdefs.


Newer versions have an AllReports collection.

In earlier versions you could opeon a recordset on the
MSysObjects table:

SELECT [Name]
FROM MSysObjects
WHERE [Type] = -32764
 
Marshall Barton said:
In earlier versions you could opeon a recordset on the
MSysObjects table:

SELECT [Name]
FROM MSysObjects
WHERE [Type] = -32764

Or use DAO to loop through the database's Reports document container:

Dim db As DAO.Database
Dim doc As DAO.Document

Set db = CurrentDb
For Each doc in db.Containers("Reports").Documents
Debug.Print doc.Name
Next doc
Set db = Nothing
 
In earlier versions you could opeon a recordset on the
MSysObjects table:

SELECT [Name]
FROM MSysObjects
WHERE [Type] = -32764
Dirk said:
Or use DAO to loop through the database's Reports document container:

Dim db As DAO.Database
Dim doc As DAO.Document

Set db = CurrentDb
For Each doc in db.Containers("Reports").Documents
Debug.Print doc.Name
Next doc
Set db = Nothing


Gee, I need to get more sleep :-(

Thanks for the reminder Dirk.
 
Back
Top