Concatenate multiple rows Into one Unique Identifier

G

garvic82

I need to concatenate multiple rows into one unique identifier.

So, my unique identifier is #id.

The number of multiple rows can vary for each #id and each row has a unique
number and I need to keep them in order.

So, let's say #id 1224567 has 5 rows and each row has a max of 255 characters.

#id #line #rep_text

1224567 0 hello, my name
1224567 1 is Suzie and
1224567 2 I would like to put
1224567 3 this all into one
1224567 4 text field.

My end result would be after concatenation:

1224567 hello, my name is Suzie and I would like to put this all into one
text field.

Help please, after many attempts I can't seem to get it to work. Thank you.
 
J

John W. Vinson

I need to concatenate multiple rows into one unique identifier.

So, my unique identifier is #id.

The number of multiple rows can vary for each #id and each row has a unique
number and I need to keep them in order.

So, let's say #id 1224567 has 5 rows and each row has a max of 255 characters.

#id #line #rep_text

1224567 0 hello, my name
1224567 1 is Suzie and
1224567 2 I would like to put
1224567 3 this all into one
1224567 4 text field.

My end result would be after concatenation:

1224567 hello, my name is Suzie and I would like to put this all into one
text field.

Help please, after many attempts I can't seem to get it to work. Thank you.

You can probably adapt the code at
http://www.mvps.org/access/modules/mdl0004.htm

As written it returns a comma delimited string but you can just omit the
commas. Do note that blanks are important: you could very well get

hello, my nameis Suzie andI would like top putthis all

and so on.

If you have problems with the code post back.
 

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