C
Curt
I created a form which allows the user to select the
criteria/group of people they wish to send an email to.
After the selection a macro is used to concatenate the
emails in the To section of Outlook. This all works fine,
but for some reason when it goes through this process the
To: section only allows 255 charaters. Is there a rule
about a string having a limit of 255? I used a
concatenate function I got from some one a couple years.
Thanks for any suggestions
Function Concatenate(pstrSQL As String, _
Optional pstrDelim As String = "; ") As String
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strConcat As String 'build return string
Set db = CurrentDb
Set rst = db.OpenRecordset(pstrSQL)
With rst
If Not .EOF Then
.MoveFirst
Do While Not .EOF
strConcat = strConcat & .Fields(0) &
pstrDelim
.MoveNext
Loop
End If
.Close
End With
Set rst = Nothing
Set db = Nothing
If Len(strConcat) > 0 Then
strConcat = Left(strConcat, Len(strConcat) - Len
(pstrDelim))
End If
Concatenate = strConcat
End Function
criteria/group of people they wish to send an email to.
After the selection a macro is used to concatenate the
emails in the To section of Outlook. This all works fine,
but for some reason when it goes through this process the
To: section only allows 255 charaters. Is there a rule
about a string having a limit of 255? I used a
concatenate function I got from some one a couple years.
Thanks for any suggestions
Function Concatenate(pstrSQL As String, _
Optional pstrDelim As String = "; ") As String
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strConcat As String 'build return string
Set db = CurrentDb
Set rst = db.OpenRecordset(pstrSQL)
With rst
If Not .EOF Then
.MoveFirst
Do While Not .EOF
strConcat = strConcat & .Fields(0) &
pstrDelim
.MoveNext
Loop
End If
.Close
End With
Set rst = Nothing
Set db = Nothing
If Len(strConcat) > 0 Then
strConcat = Left(strConcat, Len(strConcat) - Len
(pstrDelim))
End If
Concatenate = strConcat
End Function