G Guest Mar 2, 2006 #1 Knowing the report name, how do I programatically get the "recordsource" (query name) from a report.
A Allen Browne Mar 2, 2006 #2 Most of the properties are available only when the report is open, so: Dim strDoc As String strDoc = "Report1" DoCmd.OpenReport strDoc, acViewDesign, WindowMode:=acHidden Debug.Print Reports(strDoc).RecordSource DoCmd.Close acReport, strDoc Note: The WindowMode argument will not work with earlier versions of Access.
Most of the properties are available only when the report is open, so: Dim strDoc As String strDoc = "Report1" DoCmd.OpenReport strDoc, acViewDesign, WindowMode:=acHidden Debug.Print Reports(strDoc).RecordSource DoCmd.Close acReport, strDoc Note: The WindowMode argument will not work with earlier versions of Access.