ymalcolm
11-30-2001, 12:29 PM
Before I launch into the detailed description, I've foud a simple way of expressing what I need. But please feel free to read the long bits too:
If more than one order # exists for a specific customer, print all order numbers in one field spearated by commas.
my database has several tables with several one to many and many tomany relationships. I am trying to write a summary-type query which will yield all the related information from all of the tables. The query is sorted by Customer Name, but in instances where there are two orders attached to the same customer, the query produces several rows for each customer name:
Customer Name Order #
Joe Smith 11111
Joe Smith 13489
Joe Smith 99999
Bill Smith 44444
Bill Smith 66666
What I'd love to see happen is the following:
Customer Name Order #
Joe Smith 11111, 13489, 99999
Bill Smith 44444, 66666
Can this be done?
Ultimately, I'm trying to create a way that the user can view all the information for a single customer by itself. I'm attempting to do this by creating a form with a drop down list (combo box) of all the customers, retrieve all the information from a single customer (including the relationship issue described above) and then open a query which displays the records for that customer alone.
This query could then be exported to excel and the user could have separate documents for each customer.
I know I should be doing something more fun with a Friday afternoon, but...
Thanks and have a great weekend,
Yelena
[This message has been edited by ymalcolm (edited 11-30-2001).]
If more than one order # exists for a specific customer, print all order numbers in one field spearated by commas.
my database has several tables with several one to many and many tomany relationships. I am trying to write a summary-type query which will yield all the related information from all of the tables. The query is sorted by Customer Name, but in instances where there are two orders attached to the same customer, the query produces several rows for each customer name:
Customer Name Order #
Joe Smith 11111
Joe Smith 13489
Joe Smith 99999
Bill Smith 44444
Bill Smith 66666
What I'd love to see happen is the following:
Customer Name Order #
Joe Smith 11111, 13489, 99999
Bill Smith 44444, 66666
Can this be done?
Ultimately, I'm trying to create a way that the user can view all the information for a single customer by itself. I'm attempting to do this by creating a form with a drop down list (combo box) of all the customers, retrieve all the information from a single customer (including the relationship issue described above) and then open a query which displays the records for that customer alone.
This query could then be exported to excel and the user could have separate documents for each customer.
I know I should be doing something more fun with a Friday afternoon, but...
Thanks and have a great weekend,
Yelena
[This message has been edited by ymalcolm (edited 11-30-2001).]