How to tell what query an existing report is referencing?

  • Thread starter Thread starter KB
  • Start date Start date
From the interface:
1. Open the report in design view.
2. Open the Properties box (View menu).
3. On the Data tab, look at the RecordSource property of the report.

In code:
Dim strDoc As String
strDoc = "NameOfYourReportHere"
DoCmd.OpenReport strDoc, acViewDesign, WindowMode:=acHidden
Debug.Print Reports(strDoc).RecordSource
DoCmd.Close acReport, strDoc
 
Back
Top