Creating a comma separated list as a Function to be used in a Totals/Group By query

Posted on 2009-12-30
Last Modified: 2013-11-27
I would like a function that I can use in a Totals/Group By query in Access where this:

Truck   SONum
WC     234567
WC     233555
EC      236666
EC      235777

becomes this when grouping by Truck:
Truck      SONumCSV
WC         234567, 233555
EC          236666, 235777

I found this, but I'd rather have a function that I can just use in the aggregate within a Totals/Group By query.

Can someone help?

BTW, Happy New Year!

Question by:Stephanie Hudson
    LVL 10

    Expert Comment

    are you querying Access DB or are you using only Access interface to query a MS SQL database?
    LVL 1

    Author Comment

    by:Stephanie Hudson
    It's an Access database.
    LVL 40

    Accepted Solution

    LVL 1

    Author Comment

    by:Stephanie Hudson
    This is good.  I think I can make this work.  Thanks!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
    Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now