Follow-up after Charles’ answer to this question:
Access 2000 Query Criteria on Report
In Access 2000, we added the actual SQL statement in the report footer. The report in question does reference a single data source, but is actually not based on just a single query. The data-source query selects its records both from tables and from the results of a sub-query.
With appropriate module in Access, this statement puts the SQL on the report:
=GetSQLQry([RecordSource])
Assuming a final-result query ‘A’ and sub-queries ‘a’ and ‘b’, what SQL or VB statement (or parameter to this one) do I need to put in a second (or third) text box to print the SQL statement of the sub-query(ies)?