View Single Post
  #3  
Old May 21st, 2010, 07:26 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Need help with concatenation function

On Fri, 21 May 2010 10:57:01 -0700, EllenM
wrote:

Hello,
I've found a wonderful concatenation function at
http://www.mvps.org/access/modules/mdl0008.htm. It, however, separates the
concatenated values with semicolons when I'd like them to be separated with
"br /"s.

For instance, instead of "Value1; Value2; Value3", I'd like "Value1br /
Value2br / Value3br /".

Thanks in advance for your help.

Ellen


Just fix the code to your needs: where it has

With lors
If .RecordCount 0 Then
'start concatenating records
Do While Not .EOF
lovConcat = lovConcat & lors(stFldToConcat) & "; "
.MoveNext
Loop
Else
GoTo Exit_fConcatFld
End If
End With

change it to

With lors
If .RecordCount 0 Then
'start concatenating records
Do While Not .EOF
lovConcat = lovConcat & lors(stFldToConcat) & " br / "
.MoveNext
Loop
Else
GoTo Exit_fConcatFld
End If
End With
--

John W. Vinson [MVP]