Solved

Access code to Loop through stacked table and consolidate into another flatened table

Posted on 2014-11-03
2
93 Views
Last Modified: 2014-11-11
Hello Experts.

I'm needing code that will loop through a stacked table and compile results into flat table that has one line for each ID

Example:

Table: StackedResults
ID     Name
1      Tom
1      Jane
1      Sue
2      Jane
2      Denise
3      Sue
3      Denise
3      Tom

Table: FlatResults
ID     Names
1       Tom, Jane, Sue
2        Jane, Denise
3       Denise, Sue, Tom

Thank you.
0
Comment
Question by:dhemple
2 Comments
 
LVL 45

Accepted Solution

by:
aikimark earned 500 total points
ID: 40419685
Use the DConcat() function described in Patrick Matthews' article.
http:A_2380-Domain-Aggregate-for-Concatenating-Values-by-Group-in-Microsoft-Access.html
0
 

Author Closing Comment

by:dhemple
ID: 40434830
Perfect solution.  thank you for pointing me in the right direction.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

705 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

19 Experts available now in Live!

Get 1:1 Help Now