From: Dirk Goldgar on
"Dirk Goldgar" <dg(a)NOdataSPAMgnostics.com.invalid> wrote in message
news:31FFA02D-0256-42DB-B557-1E6FE19C8CC6(a)microsoft.com...

Minor correction: I should have changed the procedure's header comment to
reflect the way I cut it down. This:

> ' Search the recordsources of all reports
> ' for the specified string.

.... should have been something like this:

' List the recordsources of all reports.

Sorry about the oversight.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

From: Brad on
Dirk,

Thanks much, I appreciate your help!

Brad

~~~~~~~~~~~~~~~~~~


"Dirk Goldgar" wrote:

> "Dirk Goldgar" <dg(a)NOdataSPAMgnostics.com.invalid> wrote in message
> news:31FFA02D-0256-42DB-B557-1E6FE19C8CC6(a)microsoft.com...
>
> Minor correction: I should have changed the procedure's header comment to
> reflect the way I cut it down. This:
>
> > ' Search the recordsources of all reports
> > ' for the specified string.
>
> ... should have been something like this:
>
> ' List the recordsources of all reports.
>
> Sorry about the oversight.
>
> --
> Dirk Goldgar, MS Access MVP
> Access tips: www.datagnostics.com/tips.html
>
> (please reply to the newsgroup)
>
From: Marco Pagliero on
On 14 Mai, 12:37, Brad wrote:
> I would like to be able to obtain a list of all reports and show their
> record source (in our case, this would be a query name)
> Here is a small example -  
> REPORT       Record-Source (Query)
> Report001    Query543
> Report002    Query847
> Report003    Query093
> Report004    Query938

Sub ReportRecordSource()
Dim rpt As Report
Dim obj As AccessObject
Open "C:\Test.txt" For Output As #1

For Each obj In CurrentProject.AllReports
DoCmd.OpenReport obj.Name, acDesign
Set rpt = Reports(obj.Name)
Print #1, rpt.Name, rpt.Properties(0)
DoCmd.Close acReport, rpt.Name, acSaveNo
Next

Close
Set rpt = Nothing
Set obj = Nothing

End Sub

Regards
Marco P
From: Brad on
Marco,

Thanks, I appreciate your assistance.

Brad


"Marco Pagliero" wrote:

> On 14 Mai, 12:37, Brad wrote:
> > I would like to be able to obtain a list of all reports and show their
> > record source (in our case, this would be a query name)
> > Here is a small example -
> > REPORT Record-Source (Query)
> > Report001 Query543
> > Report002 Query847
> > Report003 Query093
> > Report004 Query938
>
> Sub ReportRecordSource()
> Dim rpt As Report
> Dim obj As AccessObject
> Open "C:\Test.txt" For Output As #1
>
> For Each obj In CurrentProject.AllReports
> DoCmd.OpenReport obj.Name, acDesign
> Set rpt = Reports(obj.Name)
> Print #1, rpt.Name, rpt.Properties(0)
> DoCmd.Close acReport, rpt.Name, acSaveNo
> Next
>
> Close
> Set rpt = Nothing
> Set obj = Nothing
>
> End Sub
>
> Regards
> Marco P
> .
>