This seems to be the problem after trying the debug procedure spikepl suggested.
qdf.SQL = Replace(CurrentDb.QueryDefs("qryReportTemplate").SQL, "Group", ![Group]) is replacing the Master.Group in the FROM statement. I also have Master.Group in the SELECT statement.
What is the easiest way...
Sorry for being a rookie at this. I know how to find the SQL for the qryReportTemplate but not how to debug.print it.
And something else to consider later is that I now realize I will have to append the ![Group] to the exsisting criteria of "<>"INACTIVE" And Is Not Null".
Thanks so much for the code!
Now the only problem is that I am getting a Run-time error '3075' at this statement:
qdf.SQL = Replace(CurrentDb.QueryDefs("qryReportTemplate").SQL, "Group", ![Group])
The name of the actual text field in the table CostCtr is "PrintGrp" so I
tried to fix it by...
My table structures:
Master: (one record per group)
Group
Group Description
CostCtr: (multiple Cost Center per group
Group
Cost Center
Cost Center Description
Detail Transactions: (multiple Transactions per Cost Center)
Cost Center
Account Number
Voucher
Amount
Date
I have a query that...