473,322 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Filter report through query

135 100+
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
3 1464
puppydogbuddy
1,923 Expert 1GB
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
Gilberto
135 100+
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
1,923 Expert 1GB
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

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

Similar topics

3
by: Richard | last post by:
Hi, I have a form based on a table. When I filter the form I want to run a report based on the same table with the same filter as the form. No problem until I want to filter a combo box where...
8
by: dick | last post by:
I am just trying to print/report the results of a "filter by selection" which is done by right-clicking a form, filling in values, and "applying the filter." I have searched the newsgroups, and...
4
by: Nhmiller | last post by:
This is directly from Access' Help: "About designing a query When you open a query in Design view, or open a form, report, or datasheet and show the Advanced Filter/Sort window (Advanced...
1
by: lorirobn | last post by:
Hi, I have a report that works just fine. Now I would like to add the capability to choose selection criteria to limit what is displayed. I created several reports that do this, but they used...
2
by: tjdoss | last post by:
I am trying to display the "Filter by Form" criteria in a Report (that displays the filtered information). I have an unbound textbox with !. as the control source that will give me the Filter itself...
3
by: emgallagher | last post by:
I have a form which lists studies. People can filter the form based on details about the study, such as the study type. Currently users filter via the right click method. I would like to be...
0
by: Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+ | last post by:
I am running Access 2007. I have a report that I want to filter. I can go into Advanced...Advanced Filter/Sort... and setup a filter that works fine on the report when I apply it. When in this...
0
by: Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+ | last post by:
I am running Access 2007. I have a report that I want to filter. I can go into Advanced...Advanced Filter/Sort... and setup a filter that works fine on the report when I apply it. When in this...
1
by: Cara Murphy | last post by:
Hi There! Hoping you are able to help me with a filtering scenario: I have created a pop up form (Filter) to filter a report (Open Issues), which currently has a number of combo boxes which...
5
by: DAHMB | last post by:
Hi all, Using Access 2007 I have a report called Sunday School Attendance based on a Query called qryAttendance the query is as follows: SELECT tblSundaySchoolAttendance.StudentID,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.