Gustav Brock
gustav at cactus.dk
Wed Aug 18 04:25:22 CDT 2004
Hi Rocky > Well, that worked - copying the sql text into the _Open event of the > sub-reports and then adding the 'HAVING' clauses (these are summation > queries) then appending the ORDER BY clause. > But I'm still curious why I can;'t seem to set the filter on a sub-report. > Is this the case? And is there a workaround? I don't know, but have in mind that the subform is "opened twice" when you open the main form. > Finally, when you modify the query which is the record source of the > sub-report by adding parameters (using querydef, I assume?), do you have to > unset the parameters the next time you run the report if the user has not > selected any filtering? I guess so, but a little testing should reveal that quite quickly ... If you used the Master and Link fields you wouldn't have this trouble. A master field can be an unbound textbox. /gustav >> Mostly because I've always done it the other way and never learned how to >> apply the filters directly to the queries. I have set the recordsource in a >> report by modifying the SQL statement that represents the query. Guess I'll >> try that. >> >> Thanks, >> >> Rocky >> >> > Why don't you apply the filter to the queries which drive the >> > subreports?