How2:Display data from multiple Records on one line seperated byCommas

P

Phil Smith

Here is My Data in [Products]

Category Item
======== ==========
Fruit Apples
Fruit Oranges
Fruit Bananas
Nuts Peanuts
Nuts Cashews
Nuts Almonds
Nuts Pistachios
Candy Mars
Candy Snickers
Candy M&Ms
Candy Baby Ruth

What I want to see in areport and ideally a query as well, is:


Category Items
======== ==================================
Fruit Apples,Oranges,Bananas
Nuts Peanuts,Cashews,Almonds,Pistachios
Candy Mars,Snickers,M&Ms,Baby Ruth


Not sure how I woudl go about this one. Ideas please?

Phil
 
M

Marshall Barton

Phil said:
Here is My Data in [Products]

Category Item
======== ==========
Fruit Apples
Fruit Oranges
Fruit Bananas
Nuts Peanuts
Nuts Cashews
Nuts Almonds
Nuts Pistachios
Candy Mars
Candy Snickers
Candy M&Ms
Candy Baby Ruth

What I want to see in areport and ideally a query as well, is:


Category Items
======== ==================================
Fruit Apples,Oranges,Bananas
Nuts Peanuts,Cashews,Almonds,Pistachios
Candy Mars,Snickers,M&Ms,Baby Ruth


You need to create a function to do that. There's a good
one at:
http://www.rogersaccesslibrary.com/...Generic Function To Concatenate Child Records'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top