Report using union query

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.
 
D

Duane Hookom

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.
 
M

mc

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top