I have an Access 2013 database program that emails a report to 108 email addresses in the company via code in a module. I have been manually editing the .send = in the code to remove or add email addresses, but now I want to put the email addresses in a table and gather them for the .send = code line. I gather the email from a recordset using:
With rst1
.MoveFirst
Do Until .EOF
strEmail = strEmail & ! & ";"
.MoveNext
Loop
End With
So now the .send = strEmail is too long since the number of characters in a line of code is limited in Access and the emails will not send due to the syntax problem of limited characters.
Does anyone know how I can programmatically parse the strEmail into, say, 10 emails per line and add “ & _ to the end of each line – except the last line?
Dan Rogotzke
With rst1
.MoveFirst
Do Until .EOF
strEmail = strEmail & ! & ";"
.MoveNext
Loop
End With
So now the .send = strEmail is too long since the number of characters in a line of code is limited in Access and the emails will not send due to the syntax problem of limited characters.
Does anyone know how I can programmatically parse the strEmail into, say, 10 emails per line and add “ & _ to the end of each line – except the last line?
Dan Rogotzke