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

Email list

Status
Not open for further replies.

Jphillis

Technical User
Jun 27, 2001
19
0
0
GB
I have a table 'person' that contains details of individuals including email addresses. Each email address is an individual record.
My objective is to have one list of email addresses, semicolon seperated, so that i can copy and paste this list into the TO box in Outlook

Any ideas on how i do this???
 
Jphillis,

Try this code...

Public Function GetEmailList() As String

Dim db as Database
Dim rst as Recordset

Set db = CurrentDB
Set rst = db.OpenRecordset("YourTableName")

Do Until rst.EOF
GetEmailList = GetEmailList & rst!YourFieldName & "; "
rst.MoveNext
Loop

GetEmailList = Left(GetEmailList,Len(GetEmailList)-2)

End Function

Hope that helps....

Craig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top