Share via

merge multiple rows with same ID

Anonymous
2013-10-12T03:42:18+00:00

Hi all

I have a Access Table like this:

ID   <br><br>1 Age <br><br>30 Name <br><br>Mr A
2 30 Mr B
3 25 Mr C
4 25 Mr D
5 25 Mrs E

How can I merge records in Name, where they have the same Age.

( I wan to merge in Query, not by grouping function in Report).

After merged, query look like this:

ID <br><br>1 Age <br><br>30 Name <br><br>Mr A, Mr B
2 25 Mr C, Mr C, Mr D, Mrs E

Pls help in details. I am just beginner of Access

Thks a lot

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2013-10-12T18:52:15+00:00

    It's quite difficult to do this directly in a Query, but you can do it easily with a little VBA code. Google for "concatenate records access" and you'll find several examples, such as

    http://allenbrowne.com/func-concat.html

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-10-12T10:52:05+00:00

    Anyone can help me? Pls. 

    I got stuck here and could not go further

    Thanks in advance

    Was this answer helpful?

    0 comments No comments
  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more