Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone know how to iterate through closed forms and reports?

Status
Not open for further replies.
Jun 25, 2003
31
GB
Access (bless its heart) has corrupted my database, and none of my (100s of) reports now have any input parameters.

I want to do something like this:
Code:
Private Sub cmdDoIt_Click()
Dim r As Report
    For Each r In Reports
        If r.InputParameters <> &quot;&quot; Then
            Debug.Print r.InputParameters
        End If
    Next r
End Sub

... but that only lists open reports. I want to get at the list of reports that you can see in the database window.

Anyone got any ideas?

Ta,

JamesH@sunsail.com
 
select Name from msysobjects where type = -32764

will show you all the reports in your database. If you want to walk through the collection, just make a recordset based on that. If you get rid of the where clause, you can learn a lot about what's in a database. Pretty nifty thing, that msysobjects table.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Look at the
Code:
currentdb.Containers(&quot;Reports&quot;).Documents
collection. There is also a &quot;Forms&quot; container and even a &quot;Scripts&quot; container for macros.

Best regards
 
I got really excited there, for a few moments...

but the thing I ommitted to mention is that I'm working with an ADP, not an MDB.

Whoops!

Is there an ADP equivalent? Or, how do you get to msysobjects from an ADP?

Ta

James
 
... so it would make sense for me to append this question to the ADP forum!

doh!

James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top