sendto multiple addresses

L

Linda in Iowa

Hi everyone,

I have a parameter query that requires the user to input a date for records
of expired memberships.
SELECT MBRS.ExpDate, MBRS.LastName, MBRS.FirstName, MBRS.Address, MBRS.City,
MBRS.State, MBRS.ZIP, MBRS.Memtype, MBRS.Email
FROM MBRS
WHERE (((MBRS.ExpDate)=[enter expiration date]) AND ((MBRS.Email) Is Not
Null))
ORDER BY MBRS.LastName;

A form shows the results as individual records.
On the form is a button to send an email notification using this line of
code:
DoCmd.SendObject acSendNoObject, , , Me!Email, , , "subject text", "message
test".
When the button is clicked, an email message is opened with the current
record email address in the To: field
Currently I have to go to each record and click the send email as it only
sends it to the record that is open.

I would like to be able to send one email that includes all email addresses
generated from running the query that this form is based on.
I have tried several things based on other users ideas and can't get it to
work . I want to put this into the code on the form so when I click on the
first one, it will loop through all records and add the email addresses to
the bcc field.
I just need to know how to code the bcc part so it will send to all
addresses generated by the query.

I am doing this in Access 2003.
 
L

Linda in Iowa

I might try using a form like that and redo the program. If run from the
query it would then show the names of all that need to receive the message.
What I really want is to just add the code to the button I already have that
opens the email and will add the email addresses to the cc: field
automatically.


Arvin Meyer said:
This demo database may be just the ticket for you. Please don't actually
send the emails though. Most will bounce, and the Senators get ticked off.

http://www.datastrat.com/Download/EmailSenate2K.zip
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Linda in Iowa said:
Hi everyone,

I have a parameter query that requires the user to input a date for
records of expired memberships.
SELECT MBRS.ExpDate, MBRS.LastName, MBRS.FirstName, MBRS.Address,
MBRS.City, MBRS.State, MBRS.ZIP, MBRS.Memtype, MBRS.Email
FROM MBRS
WHERE (((MBRS.ExpDate)=[enter expiration date]) AND ((MBRS.Email) Is Not
Null))
ORDER BY MBRS.LastName;

A form shows the results as individual records.
On the form is a button to send an email notification using this line of
code:
DoCmd.SendObject acSendNoObject, , , Me!Email, , , "subject text",
"message test".
When the button is clicked, an email message is opened with the current
record email address in the To: field
Currently I have to go to each record and click the send email as it only
sends it to the record that is open.

I would like to be able to send one email that includes all email
addresses generated from running the query that this form is based on.
I have tried several things based on other users ideas and can't get it
to work . I want to put this into the code on the form so when I click
on the first one, it will loop through all records and add the email
addresses to the bcc field.
I just need to know how to code the bcc part so it will send to all
addresses generated by the query.

I am doing this in Access 2003.
 
A

Arvin Meyer [MVP]

Have a look at the code that builds the string of email addresses in the
sample app. The code is wide open and you are free to copy any part of it or
all of it as long as you leave the copyright notices intact.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Linda in Iowa said:
I might try using a form like that and redo the program. If run from the
query it would then show the names of all that need to receive the message.
What I really want is to just add the code to the button I already have
that opens the email and will add the email addresses to the cc: field
automatically.


Arvin Meyer said:
This demo database may be just the ticket for you. Please don't actually
send the emails though. Most will bounce, and the Senators get ticked
off.

http://www.datastrat.com/Download/EmailSenate2K.zip
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Linda in Iowa said:
Hi everyone,

I have a parameter query that requires the user to input a date for
records of expired memberships.
SELECT MBRS.ExpDate, MBRS.LastName, MBRS.FirstName, MBRS.Address,
MBRS.City, MBRS.State, MBRS.ZIP, MBRS.Memtype, MBRS.Email
FROM MBRS
WHERE (((MBRS.ExpDate)=[enter expiration date]) AND ((MBRS.Email) Is Not
Null))
ORDER BY MBRS.LastName;

A form shows the results as individual records.
On the form is a button to send an email notification using this line of
code:
DoCmd.SendObject acSendNoObject, , , Me!Email, , , "subject text",
"message test".
When the button is clicked, an email message is opened with the current
record email address in the To: field
Currently I have to go to each record and click the send email as it
only sends it to the record that is open.

I would like to be able to send one email that includes all email
addresses generated from running the query that this form is based on.
I have tried several things based on other users ideas and can't get it
to work . I want to put this into the code on the form so when I click
on the first one, it will loop through all records and add the email
addresses to the bcc field.
I just need to know how to code the bcc part so it will send to all
addresses generated by the query.

I am doing this in Access 2003.
 

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