By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,929 Members | 1,245 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,929 IT Pros & Developers. It's quick & easy.

aggregating functions for text?

P: n/a
Hello,

are there any aggregating functions in Access that can concatenate (glue
together) text?
Sep 26 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Fri, 26 Sep 2008 07:16:29 +0200, Piotr Sobolewski wrote:
Hello,

are there any aggregating functions in Access that can concatenate (glue
together) text?
Perhaps an example of what you want would have been helpful.

="This is a Text message." & " " & "This is an additional message."

Is that what you mean?
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Sep 26 '08 #2

P: n/a
"Piotr Sobolewski" <NI********@gazeta.plwrote in message
news:gb**********@inews.gazeta.pl...
>
are there any aggregating functions in Access that can concatenate
(glue together) text?
If you are trying to concatenate values from related records into a string
to use with the main record, use a function like this:
http://allenbrowne.com/func-concat.html

If you just want to stick together an unpredictable number of strings that
you want to pass in, use a functon that accepts a ParamArray, like this:
Function ConcatFields(strDelim As String, ParamArray varList()) As Variant
Dim strout As String
Dim i As Integer

For i = LBound(varList) To UBound(varList)
If Not IsNull(varList(i)) Then
strout = strout & varList(i) & strDelim
End If
Next
i = Len(strout) - Len(strDelim)
If i 0 Then
ConcatFields = Left(strout, i)
Else
ConcatFields = Null
End If
End Function

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

Sep 26 '08 #3

P: n/a
Allen Browne wrote:
>are there any aggregating functions in Access that can concatenate
(glue together) text?

If you are trying to concatenate values from related records into a string
to use with the main record, use a function like this:
(...)
Thanks a lot!
Sep 26 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.