By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,515 Members | 1,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,515 IT Pros & Developers. It's quick & easy.

Query and Report Parameters

P: n/a
I'm not sure I understand the use of parameter queries and reports.

I have a query that returns calculations for Categories. There are 6
Categories (A,B,C,D,E,F).
There are also two Types of results Y and Z.
The result may not have all Categories or Types, because there may not
have values yet for a particular Category and Type.
I called this query qryTotals.
Here are the results....
Cat Typ Tot
--- --- ---
A Y 3
A Z 7
B Z 2
D Y 5
F Y 1
F Z 9
I need a report that gives me all Categories for a particular Type.
I would like the report to supply the Type value automatically. (Do not

want to prompt the user)
For example the results would be for Type ='Y'....
Cat Typ Tot
--- --- ---
A Y 3
B 0
C 0
D Y 5
E 0
F Y 1
So, I thought of making another query that gives me all Categories and
if there are no values for a particular Category, set it to zero using
I created another query like this (pseudo QBE)...
Categories -------qryTotals (Outer join to include all Categories)
and created a Type parameter in the qryTotals query.
When executed, the new query asks for the Type parameter and the
results are as shown above.
Is there a way to create a report or query that will automatically
supply the parameter to the
first query?

Aug 23 '06 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Any reason you can't pass the filter in the open event of the report?

Aug 23 '06 #2

P: n/a
The idea is to be able to create two different result sets by having
the second query supply the criteria to the inner (first) query.

The nature of the first query is Aggregate, if the second query
processes the criteria, the results do not include all the Categories.

So, again, I ask, is there a way to pass the criteria to the first
query from the second query?

When run from the QBE, as a user, I supply the dialog box with the
criteria and it is passed to the first query (the parameter is in the
first query). The results are as expected.

pi******** wrote:
Any reason you can't pass the filter in the open event of the report?
Aug 23 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.