Record output in queries

  • Thread starter Thread starter rbeach
  • Start date Start date
R

rbeach

I have some records in a table that list up to five parts. Below is a sample
record in a table:

Order Part1 Part2 Part3
001 001 002 003
002 005 006 007
003 009 010 011

I run a query to select multiple orders and the output is as below:

Order Part1 Part2 Part3
001 001 002 003
003 009 010 010

I need the items listed as records in the query as below:

Order Part
001 001
001 002
001 003
003 009
003 010
004 011

Please let me know how to accomplish this.
 
Created the Union Query as suggested. I then created a second query to get
the details needed for each part (ie the cost, tax and overhead) and used the
union query just created for the selection criteria. Everything is working
properly. Thanks for your assistance.
--
Rick


John Spencer MVP said:
You will have to use a union query to fix that problem. A union query cannot
be built (or displayed) in query design view. You have to use the SQL view to
build the query. It would look something like:

SELECT [Order], Part1 as Part
FROM [YourTable]
UNION
SELECT [Order], Part2
FROM [YourTable]
UNION
SELECT [Order], Part3
FROM [YourTable]
UNION
SELECT [Order], Part4
FROM [YourTable]

Once you have that built you can use it as if it were a table.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
I have some records in a table that list up to five parts. Below is a sample
record in a table:

Order Part1 Part2 Part3
001 001 002 003
002 005 006 007
003 009 010 011

I run a query to select multiple orders and the output is as below:

Order Part1 Part2 Part3
001 001 002 003
003 009 010 010

I need the items listed as records in the query as below:

Order Part
001 001
001 002
001 003
003 009
003 010
004 011

Please let me know how to accomplish this.
 
Back
Top