I have a question in MS Access 2007 and I hope someone has the answer. I have a long but simple table containing customer names and the days of the week that deliveries are made. I would like to summarize this table by listing the name and all the days into one new field “ALLDays” while still preserving all the data.
The source table looks something like this:
Name Day
CustomerA Monday
CustomerA Thursday
CustomerB Tuesday
CustomerB Friday
CustomerC Wednesday
CustomerC Saturday
I would like to have a query which returns results like this:
Name ALLDays
CustomerA Monday, Thursday
CustomerB Tuesday, Friday
CustomerC Wednesday, Saturday
Thanks.
Typically you have to write a function that will allow you to create a concatenated list. Here’s what I’ve used:.
Remou’s version has the added feature that you can pass an array of values instead of a SQL statement.
Sample query might look like: