Hello,
How can I concatenate data in a field? Example, I got an output of data that print out on the report as one data per row:
20
25
41
56
and I want it to look like
20, 25, 41, 56
The number of data in the field various.
Thanks.
Printable View
Hello,
How can I concatenate data in a field? Example, I got an output of data that print out on the report as one data per row:
20
25
41
56
and I want it to look like
20, 25, 41, 56
The number of data in the field various.
Thanks.
Use a loop to go through the number of fields you have. The first time the loop runs, the temporary string will have nothing in it. Every time after, it will concatenante a comma and space, then concatenate the next field. Once the all the fields have been looped through, you will have one string with the values separated by a comma.
Code:dim intCounter as Integer
dim strTempString as String
For intCounter = 1 to <number of Fields>
If strTempString = "" then
strTempString = Field(intCounter)
Else
strTempString = strTempString & ", " & Field(intCounter)
End If
Next intCounter
Fiona