Report using union query

  • Thread starter Thread starter mc
  • Start date Start date
M

mc

I created a report that is using a union query. When I run the
docmd.openreport to run the report, I am passing the parameter [As_at_date] =
#11/10/2009# for the wherecondition. It's totally ignoring the
wherecondition, it's giving me all the data. How do I get around this
problem? Should I create a table to dump the results of my union query with
the data I want and then change my report to pick up the data from this new
table?
Any help would be appreciated.
 
Your issue is caused by placing the where condition in the wrong place in the
DoCmd.OpenReport. You have it following the second comma and it should be
following the third comma.
 
Thank you!

Duane Hookom said:
Your issue is caused by placing the where condition in the wrong place in the
DoCmd.OpenReport. You have it following the second comma and it should be
following the third comma.

--
Duane Hookom
Microsoft Access MVP


mc said:
I created a report that is using a union query. When I run the
docmd.openreport to run the report, I am passing the parameter [As_at_date] =
#11/10/2009# for the wherecondition. It's totally ignoring the
wherecondition, it's giving me all the data. How do I get around this
problem? Should I create a table to dump the results of my union query with
the data I want and then change my report to pick up the data from this new
table?
Any help would be appreciated.
 
Back
Top