Solved

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

Posted on 2014-11-03
2
99 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
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…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

734 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