Generate an email from an access field to multiple users

G

Guest

I have a query with a field that contains email addresses. If I click on an
individual email address it will open my email program and place the address
in the To field.

What I would like to do is have all the email addresses in that column
appear in the To field. Is this possible. I have very minimal coding
expertise.

Thanks for your help
Kris
 
G

Guest

Hi Kris,

You will need to separate your email addresses with a semi colon, so in a
function, open a recordset containing your email addresses, and append each
address to a string variable with a semi colon. Then return that variable
from your function, and hey presto you have a list of email addresses to use.

eg:
function GetEmailAddresses() as string
dim db as database
dim rst as recordset
dim strEmail as string

set db = currentdb
set rst = db.openrecordset("select EmailAddress from tblEmail")
strEmail = ""

do while not rst.eof
strEmail = strEmail & rst("EmailAddress") & "; "
rst.movenext
loop

GetEmailAddresses = strEmail

end function

Hope this helps.

Damian.
 
G

Guest

Damian

Thanks for your response. As I am a bit light on in my coding expertise,
where do I need to be to do this Function??

Kris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top