Thanks for the reply!
But am having problem with it. When i open the query with the code
fConcatChild("TM_bi_ast_ext","bsort","Sensitive2","Double",[TM_bi_ast_ext.bsort])
an error message appears as: "Compile error: Expected user-defined type,
not
project", it would then highlight in yellow the:
Function fConcatChild(strChildTable As String, _
strIDName As String, _
strFldConcat As String, _
strIDType As String, _
varIDvalue As Variant) _
As String
and also highlight in black the part "db As Database" from Dim db As
Database. What did i do wrong?
TM_bi_ast_ext is the name of the many side table
bsort is the primary key of one side table
Sensitive2 is the field name to concatenate
Long id the data type, i used an autonumber as the primary key
TM_bi_ast_ext.bsort is the value on which return concatenated Quantity
I tried it using the northwind project and it worked properly.
thanks again!
Allen Browne said:
See:
Return a concatenated list of sub-record values
at:
http://www.mvps.org/access/modules/mdl0004.htm
The article explains how to programmatically combine the values from
multiple related records into one string.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Reply to group, rather than allenbrowne at mvps dot org.
I have a subform that have this fields:
ID Organ Isolate
1 Liver E. coli
2 Lung E. coli
3 Heart Salmonella
in my report, i want the field Isolate to show this: E. coli, E. coli,
Salmonella. instead of E. coli
E. coli
Salmonella
How can i do this?
Thanks!