Enumerate Reports in an external DB

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

Guest

This Code will work to enumerate report names in the current database. How
do I tweek this to enumerate rerport names in an external database?

'*********************************
Public Sub Name_Reports()
'*******************************&&
Dim obj As AccessObject, dbs As Object
Dim myReport As String

Set dbs = Application.CurrentProject
' Search for open AccessObject objects in AllReports collection.
For Each obj In dbs.AllReports
myReport = obj.Name

Next obj

End Sub
 
Try something like this:
SELECT MSysObjects.Name
FROM MSysObjects IN 'C:\MyFile.mdb'
WHERE MSysObjects.Type = -32764
ORDER BY MSysObjects.Name;
 
Allen,

Perfect, Thank YOU!

Ross

Allen Browne said:
Try something like this:
SELECT MSysObjects.Name
FROM MSysObjects IN 'C:\MyFile.mdb'
WHERE MSysObjects.Type = -32764
ORDER BY MSysObjects.Name;
 
Back
Top