I have a Query that generates a list of 2% finance or service charges on completed orders whose balance is overdue this works fine. I then have a second query that totals the finance charges per customer (this bit also works fine) what I would like to get in that second totals query is a comma (or semicolon or space or pipe or ...) separated list of orders in another field
so for the first query I have:
CustomerID OrderID ContactName FinanceChargeAmmount
218 31901 Joe Schmoe Construction 23.43
218 31927 Joe Schmoe Construction 15.78
218 31929 Joe Schmoe Construction 8.91
231 33403 Billy Bob Construction 0.43
258 33369 XYZ Corp 0.77
258 33546 XYZ Corp 1.23
and the second I have:
CustomerID ContactName SumOfFinanceChargeAmmount
218 Joe Schmoe Construction 48.12
231 Billy Bob Construction 0.43
258 XYZ Corp 2.00
I would like to add another column to the second table like:
CustomerID ContactName SumOfFinanceChargeAmmount Orders
218 Joe Schmoe Construction 48.12 31901, 31927, 31929
231 Billy Bob Construction 0.43 33403
258 XYZ Corp 2.00 33369, 33546
but can't figure out a way to loop in the query or get a list of the summed values and while I understand that I should be able to do this in VBA I'm trying to avoid doing so if possible