Filtering a subreport (1 Viewer)

D

dbradley

Guest
I am using a subreport to display the number of closed projects found in my project table. The output looks like this: Closed = 20. This is done by setting the recordsource to a query that counts the number of "Closed" in the status field. I would like to further filter the subreport output by selecting a specific team (via the Team field), but I can't seem to filter a subreport that has a query for a recordsource.

I am able to filter the main report (which is also query-based) by using the following statement: DoCmd.OpenReport "Closed Report",PrintMode, , strTeamFilter where the filter is the following SQL statement: "([Project Summary].Team)='" & psTeamName & "'".

The main report shows the filtered output correctly. I now need to get the subreport's total to do the same.
 

Travis

Registered User.
Local time
Today, 11:14
Joined
Dec 17, 1999
Messages
1,332
Try using the Team also in the Parent/Child Relationship. This should limit the subReport to the Team Data.
 

Users who are viewing this thread

Top Bottom