Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Multiple Recipients

Status
Not open for further replies.

kb178

IS-IT--Management
Aug 16, 2001
83
US
Hi Guys - I've been looking through these forums all morning and can't figure this out. All I want to do is send this email to the complete list of email addresses that comes out of my query, but I can only get it to the first one. This is what I've got:

Dim EmailAddress As ADODB.Recordset
...
SelectString="Select Email From ..."
EmailAddress.Open SelectString
strCC = EmailAddress("Email")
EmailAddress.close

The results from the query bring up a few addresses. How do I get all of them? Thanks!
 
Look at a Do loop

Something like:
EmailAddress.Open SelectString
Do while not EmailAddress.EOF
strCC = strcc & EmailAddress("Email") & ";"
Loop
EmailAddress.close
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Do you need anything else with a do loop? It keeps hanging at "Loop"
 
Nevermind, figured it out!
Do while not EmailAddress.EOF
strCC = strcc & EmailAddress("Email") & ";"
EmailAddress.MoveNext
Loop

Thanks johnwm!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top