Sending E-mail to Multiple Addresses

K

Kat

Hiya,

I am trying to create a Contact Database in Access. This database includes
an e-mail field.

What I would like to be able to do is to run a query on specific customers
(say, all the customer from a specific City), and then be able to somehow
create an Outlook e-mail containing all of those customer's e-mail addresses.

So, for example, if I run a query for Atlanta, I want to be able to click on
a button or run something so that a new Outlook message pops up, and all 15
of those e-mail addresses populate in the "To" field.

I've searched online, including this forum, and found similar issues, but
they're usually specific to each person's cause, or they include code that I
either don't know how to use, or that I get errors on. I need, if possible,
some steps that would allow me to create a Macro or a Module that will help
me.

Now, if that's too complicated, I'd be willing to settle for a way to
concatenate all of those people's e-mails so I can copy and paste the list
(separated by semi-colons)... If that's an easier thing to do, I'll
settle... I know I could run the query and copy and paste e-mail addresses,
but if a group is too large, that will become too much of an issue... At
least with the grouping together, I can cut and paste one field....

Any help would be greatly appreciated.

Thank you,
 
K

Kat

Thank you for your response. It looks like the code in the example has you
manually putting the customer's names in. I need to be able to run different
queries or add a customer to a city and have it be added the next time I try
to send a mass e-mail. That's why I was thinking the concatenate thing might
be better....

Is there a way to make Access look in the e-mail field and take what's
there, from a Query?

Or string the text together w/semi-colons?

Thanks!
 
K

Kat

Thank you, HTH....

I have a question for you, though, w/regards to your post...

Is it only possible to do this through Form View? If so, can I make several
buttons on the Form to create e-mails that will take from specific records?
For example, if I have check boxes on my form that say: Atlanta, New York,
Miami.... can I put a button for each city that, when pushed, will then run a
query on all of the people w/Atlanta checked, and then create the e-mail (or
put the e-mail addresses together)?

Otherwise, I have to run a query on that city to bring up a table with all
the clients from Atlanta.... and I can't put a button on a query... although
I know you can put a button on the form to run a query, I'm not sure how that
works with what I'm trying to do...

Also, in the code, I get hung up on this line:

rs.Open "YourEmailTable", CurrentProject.Connection, adOpenDynamic,
adLockOptimistic

I tried to put the name of my table in that field ("YourEmailTable"), but it
still says "Compile Error: Invalid outside procedure"

Thanks!!
 
F

freakazeud

Hi,
I'm not exactly sure how your table structure looks, but normally this would
be done with a query.
You can reference the form controls where the user makes the criteria
parameter choice within the query fields criteria area e.g.:

[Forms]![YourForm]![YourControl]

If you run the query it should show you all the data you want.
Then you can use this query as a base of the automation code I linked you to
earlier, which could be executed from within the same form.
HTH
Good luck
 

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