>I wrote a function to look thru all tables and queries in a db to find a
>specified string. I used keywords: TableDefs and: QueryDefs in my code. I
>want to create a similar function to look through report definititons. Is
>this possible? I see no: ReportDefs variable......
That's an awful lot of work to save a few bucks on already
available add ins.
Anyway, to answer your question:
For Each doc In db.Containers("Reports").Documents
DoCmd.OpenReport doc.Name, acDesign
With Reports(doc.Name)
' do your thing here
End With
DoCmd.Close scReport, doc.Name, acSaveNo
Next doc
Starting in A2k, you could also achieve this using the
AllReports collection (see Help), but I'm not sure it makes
anything easier.

Signature
Marsh
MVP [MS Access]
Andre L - 23 Dec 2005 20:29 GMT
not sure about the addins but thanks for the code!
>>I wrote a function to look thru all tables and queries in a db to find a
>>specified string. I used keywords: TableDefs and: QueryDefs in my code. I
[quoted text clipped - 17 lines]
>AllReports collection (see Help), but I'm not sure it makes
>anything easier.
Andre L - 23 Dec 2005 20:54 GMT
HOW DO YOU DEFINE DOC? I am using Access 2000.
>>I wrote a function to look thru all tables and queries in a db to find a
>>specified string. I used keywords: TableDefs and: QueryDefs in my code. I
[quoted text clipped - 17 lines]
>AllReports collection (see Help), but I'm not sure it makes
>anything easier.
TC - 24 Dec 2005 02:16 GMT
db would of course be:
dim db as datbase
set db = curentdb()
and doc would be:
dim doc as document
HTH,
TC