View Full Version : Joining Fields shows duplicates


randolphoralph
11-21-2008, 10:26 AM
I have two tables (One table named Customer Info has address, phone #...etc and the other table named Customer Order has order info)

I have joined the Customer # field from both tables and set it to include all records from 'Customer Info' and only those records from 'Customer Order' where the joined fields are equal.

The problem is that when I run the query if a certain customer has more than one order in the Customer Order table it duplicates the Customer Info for each order.

Here is a example of what the query is doing:

Customer X Customer X Address Item Price
Customer X Customer X Address Item Price

Customer Y Customer Y Address Item Price
Customer Y Customer Y Address Item Price
Customer Y Customer Y Address Item Price


How do I prevent this?

Here is a example of what I am looking for.


Customer X Customer X Address Item Price
-------------------------------Item Price

Customer Y Customer Y Address Item Price
-------------------------------Item Price
-------------------------------Item Price


*Disregard the ---- I had to do that so that the items would line up

Brianwarnock
11-21-2008, 11:08 AM
You will need to produce a report to achieve this.

Brian

Alansidman
11-21-2008, 11:28 AM
I think if you set your query to a pivot table, you may be able to achieve the expected results.
Alan

randolphoralph
11-21-2008, 11:48 AM
I thought that there may be another way of doing this short of a pivot table or report.

If I pulled it into Excel is there a way?

Alansidman
11-21-2008, 12:17 PM
If you pull it back into Excel, there is still the pivot table option, or a manual elimination of the cells. Actually, the Pivot Table seems like the easiest means to accomplish exactly what you are looking for.

Alan

boblarson
11-21-2008, 12:34 PM
The best way for this is either a form with a subform or a report with a subreport.

randolphoralph
11-21-2008, 02:50 PM
Thank you all!