D
Dave G.
I have a report that I am capturing various parameters
(via a form) and then calling the report with a
DoCmd.openReport and passing the strWhereCategory.
The issue is that the query that the report is based on
does a group by (e.g. 3 columns, see below) since those
are the only fields that I want. However, the where
clause filter is based on fields that are in the table,
but not in the select list (due to the group by).
When I run the report, i get prompted to enter the
parameter. If I hardcode the fld4 criteria in the query,
it works fine. I'm assuming it prompts me from the report
because the fld4 is not in the select list. Is the only
way to dynamically filter the report on fields that are
actually in the select list? Is there any work around for
this?
Thanks,
Dave
Example (Note: Employee is a linked table)
table: Employee
fields: fld1, fld2, fld3, fld4
select fld1,fld2,fld3
from Employee
where fld4 = '10' <--fld4 is the filter parameter!
group by fld1,fld2,fld3
(via a form) and then calling the report with a
DoCmd.openReport and passing the strWhereCategory.
The issue is that the query that the report is based on
does a group by (e.g. 3 columns, see below) since those
are the only fields that I want. However, the where
clause filter is based on fields that are in the table,
but not in the select list (due to the group by).
When I run the report, i get prompted to enter the
parameter. If I hardcode the fld4 criteria in the query,
it works fine. I'm assuming it prompts me from the report
because the fld4 is not in the select list. Is the only
way to dynamically filter the report on fields that are
actually in the select list? Is there any work around for
this?
Thanks,
Dave
Example (Note: Employee is a linked table)
table: Employee
fields: fld1, fld2, fld3, fld4
select fld1,fld2,fld3
from Employee
where fld4 = '10' <--fld4 is the filter parameter!
group by fld1,fld2,fld3