ConcatFld control order of concatenation

  • Thread starter Thread starter yator
  • Start date Start date
Y

yator

I am using Dev Ashish’s ConcatFld function to concatenate fields from
different rows in the same table. The problem is that I need to concatenate
the fields in a specific order according to another field in the table called
“mess_sortâ€.

My Table structure:
tbl_message
mess_no
mess_sort
message


My SQL:

SELECT tbl_message.mess_no,
fConcatFld("tbl_message","mess_no","message","string",[tbl_message].[mess_no]) AS ConcatFinal
FROM tbl_message
GROUP BY tbl_message.mess_no

I there a way to control the order in which the fields concatenate?
 
In addition to Allen's solution, there is a generic concatenate function at
http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=4&SID=z4d8146z4d15f24fcc5z777bfdb569z2.
--
Duane Hookom
Microsoft Access MVP


Allen Browne said:
Here's an alternative to Dev's function:
Concatenate values from related records
at:
http://allenbrowne.com/func-concat.html

It includes an optional argument to specify the name of the field to ORDER
BY.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

yator said:
I am using Dev Ashish’s ConcatFld function to concatenate fields from
different rows in the same table. The problem is that I need to
concatenate
the fields in a specific order according to another field in the table
called
“mess_sortâ€.

My Table structure:
tbl_message
mess_no
mess_sort
message


My SQL:

SELECT tbl_message.mess_no,
fConcatFld("tbl_message","mess_no","message","string",[tbl_message].[mess_no])
AS ConcatFinal
FROM tbl_message
GROUP BY tbl_message.mess_no

I there a way to control the order in which the fields concatenate?
 
most beautiful !!!! thanks Allen!

Allen Browne said:
Here's an alternative to Dev's function:
Concatenate values from related records
at:
http://allenbrowne.com/func-concat.html

It includes an optional argument to specify the name of the field to ORDER
BY.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

yator said:
I am using Dev Ashish’s ConcatFld function to concatenate fields from
different rows in the same table. The problem is that I need to
concatenate
the fields in a specific order according to another field in the table
called
“mess_sortâ€.

My Table structure:
tbl_message
mess_no
mess_sort
message


My SQL:

SELECT tbl_message.mess_no,
fConcatFld("tbl_message","mess_no","message","string",[tbl_message].[mess_no])
AS ConcatFinal
FROM tbl_message
GROUP BY tbl_message.mess_no

I there a way to control the order in which the fields concatenate?
 
yes, Duane, I have downloaded your function. Unfortunately I am still in the
jurassic age with Access 97 and need to borrow someone's computer with Access
2000 to check it out!

Duane Hookom said:
In addition to Allen's solution, there is a generic concatenate function at
http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=4&SID=z4d8146z4d15f24fcc5z777bfdb569z2.
--
Duane Hookom
Microsoft Access MVP


Allen Browne said:
Here's an alternative to Dev's function:
Concatenate values from related records
at:
http://allenbrowne.com/func-concat.html

It includes an optional argument to specify the name of the field to ORDER
BY.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

yator said:
I am using Dev Ashish’s ConcatFld function to concatenate fields from
different rows in the same table. The problem is that I need to
concatenate
the fields in a specific order according to another field in the table
called
“mess_sortâ€.

My Table structure:
tbl_message
mess_no
mess_sort
message


My SQL:

SELECT tbl_message.mess_no,
fConcatFld("tbl_message","mess_no","message","string",[tbl_message].[mess_no])
AS ConcatFinal
FROM tbl_message
GROUP BY tbl_message.mess_no

I there a way to control the order in which the fields concatenate?
 
Back
Top