473,480 Members | 2,840 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Query and Report Parameters

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
nz(Total).
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?
TIA

Aug 23 '06 #1
2 1438
Any reason you can't pass the filter in the open event of the report?

Aug 23 '06 #2
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.

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
10575
by: Ryan Hubbard | last post by:
Is it possible to get the recordset from an open query window? So you run the query. The window is open. Can vba retrieve this data?
1
2895
by: longtim | last post by:
I have been having endless difficulty creating reports/queries that set any relevent parameters from controls in forms. I am creating an application under access 2003 but will target access...
15
4382
by: Richard Hollenbeck | last post by:
I tried to ask this question before on the 14th of January but I never got a reply. I'm still struggling with the problem. I'll try to rephrase the question: I have a crosstab query with rows...
4
5701
by: Andy Davis | last post by:
I have developed a number of reports that are based on parameter queries where the user enters criteria such as a date range and a sales rep say. I want to be able to show a graphical picture in...
3
3399
by: Bryan | last post by:
I've been looking over this newsgroup, but I can't find an answer to my problem. I see that a few others have posted this issue over the years, but none of them got a response. I'll give it...
13
4199
by: Lee | last post by:
Hello All, First of all I would like to say thank you for all of the help I have received here. I have been teaching myself Access for about 4 years now and I've always been able to find a...
2
2526
by: scott.k.fraley | last post by:
....and the SELECT thats trying to pull from said Query doesn't like it one bit! ;) I'm working on this project (in Access 2002) and there is a report who's RecordSource is the following...
5
5279
by: dana1 | last post by:
Hello Experts! Does anyone know if there is a way to set the values of query parameters from VBA for a report's recordsource? (i.e., I want to set the values of the parameters and NOT have the...
3
2053
by: Richard Hollenbeck | last post by:
I am very sorry about the (almost) re-post, but you will see that my first question wasn't very clear; I have another question I posted this morning called, "in DAO: Run time error 3061 Too few...
6
6819
by: Phil Stanton | last post by:
I am running a query that calls a function used to format addresses depending on the width of a control on a report that shows that address. The same query is used as the RecordSource of lots of...
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7060
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6760
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3004
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.