Report Generated From Two Queries...

  • Thread starter Thread starter ThePandaManCan
  • Start date Start date
T

ThePandaManCan

Hey all,

I have a report generated from two separate queries. One is used
as a sub-report of the other. The problem is, the first query asks the
value the user wishes to search for. The second query (subreport) also
needs this number to display its value. At current, when I run the
report, it asks for the value three times.

Is there a way to ask for the value once from the user and then
for that value to be passed on to the other query so that it doesn't
ask the user more than once per report?

Thanks,

-ThePandaMan
 
I answered my own question. The trick is to use the query to store the
value the user has entered like so:

[Please Enter Stored Value] AS StoredValueOne (add this at the end of
the query's select statement).

Then, on the report, you create a hidden field bound to StoredValueOne
w/ a name of StoredValueOneTxt... Then, in your second query, you put
in the criteria field [Reports]![NameOfReport]![StoredValueOneTxt].

Worked like a charm :)

-ThePandaMan
 
Back
Top