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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

store results into an array

Status
Not open for further replies.

jasonhuibers

Programmer
Sep 12, 2005
290
CA
How can I take all the email address and store them into a variable seperated by a comma?

IE: jason@yahoo.com, julie@yahoo.com

do while not drs.eof
strEmailArray = drs("EmailAddress")
drs.MoveNext
 
Your question is a little unclear (to me anyway), is this what you are looking for?
Code:
do while not drs.eof
   strEmailArray = strEmailArray & drs("EmailAddress") & ","
   drs.MoveNext
Loop

'get rid of the last comma
If Right(strEmailArray, 1) = "," Then
   strEmailArray = Left(strEmailArray, Len(strEmailArray) - 1)
End If
But that's not really an array...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top