I have this VBA that loops through records and splits the printing of a report based on the LoopedField. I need to add date range parameters to the underlying query and I want to store the date values in a form.
When I change the Const Domain to point to the query with the date parameters I get the error message
The reason I need to change the Const Domain is that since I am applying a date filter I need to filter the looped field so that I only create reports for UserOrgs that have data during the filtered date range. Without filtering the looped field I get reports for every UserOrg and up with blank reports.
When executed on their own, not through the report, the two query results look exactly the same. Same fields, same values, same record count. I cannot figure out why I am having the problem. I am sure you need information that I have not provided. If you can tell me where I should investigate I certainly appreciate it!
I am using a query as the const domain. The working query references a query which references another query which references tbl1. The broken query references a query which references a query (which picks up the date parameter) which references tbl1. Like I said, if I leave the date range wide open I get the same results when I run the working Const Domain and the broken Const Domain. Since the underlying queries are presenting the same data to the report I cannot figure out why one is not working.
I joined this forum in 2005. I am still a hack.
When I change the Const Domain to point to the query with the date parameters I get the error message
Code:
Run-time error 3061: Too few parameters. Expected 2.
The reason I need to change the Const Domain is that since I am applying a date filter I need to filter the looped field so that I only create reports for UserOrgs that have data during the filtered date range. Without filtering the looped field I get reports for every UserOrg and up with blank reports.
When executed on their own, not through the report, the two query results look exactly the same. Same fields, same values, same record count. I cannot figure out why I am having the problem. I am sure you need information that I have not provided. If you can tell me where I should investigate I certainly appreciate it!
I am using a query as the const domain. The working query references a query which references another query which references tbl1. The broken query references a query which references a query (which picks up the date parameter) which references tbl1. Like I said, if I leave the date range wide open I get the same results when I run the working Const Domain and the broken Const Domain. Since the underlying queries are presenting the same data to the report I cannot figure out why one is not working.
I joined this forum in 2005. I am still a hack.