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

Filter report through query

100+
P: 135
Hello,

I have a table with product information (weight, density, price, level 1, level 2, level3, etc.)

The situation is that the SAME product can be part of LEVEL 1 AND/or LEVEL 2 AND/or LEVEL 3. Each of this LEVEL is a different field.

I have created 3 queries which show me the products that belong to each category. In the same way i created 3 separate reports which by using these 3 different queries can show me the products details by level.

I was wondering if there is a way to create only ONE report which will "filter" the information according to the LEVEL (1,2 or 3) the user wants to print, just by clicking on some buttons (LEVEL 1, LEVEL 2, LEVEL 3).

Thanks,
Gilberto
Sep 10 '07 #1
Share this Question
Share on Google+
3 Replies


puppydogbuddy
Expert 100+
P: 1,923
Hello,

I have a table with product information (weight, density, price, level 1, level 2, level3, etc.)

The situation is that the SAME product can be part of LEVEL 1 AND/or LEVEL 2 AND/or LEVEL 3. Each of this LEVEL is a different field.

I have created 3 queries which show me the products that belong to each category. In the same way i created 3 separate reports which by using these 3 different queries can show me the products details by level.

I was wondering if there is a way to create only ONE report which will "filter" the information according to the LEVEL (1,2 or 3) the user wants to print, just by clicking on some buttons (LEVEL 1, LEVEL 2, LEVEL 3).


Thanks,
Gilberto
1. Yes, use a union query to put the levels in one field, like this:

Select weight, density, price, level1 As level
Union Select weight, density, price, level2 As level
Union Select weight, density, price, level3 As level

2. use the union query for your report, grouping on level
Sep 10 '07 #2

100+
P: 135
1. Yes, use a union query to put the levels in one field, like this:

Select weight, density, price, level1 As level
Union Select weight, density, price, level2 As level
Union Select weight, density, price, level3 As level

2. use the union query for your report, grouping on level
Thank you very much for the reply, im just really new with access, could you elaborate a little bit more on how to achieve this please??

Ive tried the following:

The query has the following fields:
Product Name French
Commodity
Weight
Variant1
Variant2
Variant3

(all fields are from table ENGINEERING, i havent typed any criteria and ALL are shown)

In the UPDATE i have typed:

Expand|Select|Wrap|Line Numbers
  1. Select product name french, commodity, weight, variant1 as variant
  2. union select product name french, commodity, weight, variant2 as variant
  3. union select product name french, commodity, weight, variant3 as variant
and i get the error: "Syntax error (missing operator) in query expresion 'product name french'."

What can i do? ive never created UPDATE queries before.

Thanks
Sep 14 '07 #3

puppydogbuddy
Expert 100+
P: 1,923
Thank you very much for the reply, im just really new with access, could you elaborate a little bit more on how to achieve this please??

Ive tried the following:

The query has the following fields:
Product Name French
Commodity
Weight
Variant1
Variant2
Variant3

(all fields are from table ENGINEERING, i havent typed any criteria and ALL are shown)

In the UPDATE i have typed:

Expand|Select|Wrap|Line Numbers
  1. Select product name french, commodity, weight, variant1 as variant
  2. union select product name french, commodity, weight, variant2 as variant
  3. union select product name french, commodity, weight, variant3 as variant
and i get the error: "Syntax error (missing operator) in query expresion 'product name french'."

What can i do? ive never created UPDATE queries before.

Thanks
If field names have spaces, they must be surrounded by brackets as shown:

Expand|Select|Wrap|Line Numbers
  1. Select [product name french], commodity, weight, variant1 as variant
  2. union select [product name french], commodity, weight, variant2 as variant
  3. union select [product name french], commodity, weight, variant3 as variant
Sep 14 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.