A Second Query In A Report Using The Same Parameter

joeblow2

Registered User.
Local time
Today, 12:28
Joined
Jun 28, 2008
Messages
39
Hi:
I have a report based on a query, say Query1.
Now I want to include in the report, a field (SumofQuantity) based on a second query, say Query2.
Both Query1 and Query2 have the same parameter needed to run them.
Is this possible? Initially I used the expression builder to say: "=Query2!SumofQuantity" in the control source of the textbox that I want to hold SumofQuantity.
But this doesn't work. Any ideas?
Thanks in advance.
 
You can either use a DLookup() to get the value from the second query:

=DLookup(...)

or base a subreport on the second query.
 
Thanks for your reply.

However, how would I pass the value of the parameter to either DLookup or the sub report?

Thanks.
 
Personally I use forms to gather user input and have queries get the value from there. Using

[Enter whatever]

in a query doesn't give you much control.
 
If I had a form to gather the info, how would I make the query get the value of a parameter?

Am I on the right track if I say something like:

[Forms]![Form Name].Control Name ?

Thanks.
 

Users who are viewing this thread

Back
Top Bottom