Enumerate Reports in an external DB

R

Ross

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
 
A

Allen Browne

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

Ross

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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top