Help with getting the right output

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am sending email using the sendobject method. I have a table of email
addresses for people in different companies. I want to send an email to each
person in each company, but only want to send one email per company. How can
I code it so that if the company is in my company table and the emails are
in my related email table that an email will be sent via the send object
method. Please Help! I have waisted days trying to do this. Thanks in
advance.
 
Hi!

First i don't know how exactly is youe code written,
anyway from my experience (as i do a lot of communications
by email for a bank using different vba code) if you want
to send an email for each of them, create a loop on table
recordset. In emails you can include subjects with company
names attached for each of them, cover notes, different
attachments and so on).

Marsela
MOS- MCP

I have a lot of samples of sending emails by using VBA
code, for a bank, where i need to commun
 
I do not currently have a code established for what I want to accomplish
because I am having trouble with the logic.

I am currently sending the email using the send object method.

Ex.
dim txt as string
text = "email body"

sendobject.query "myQuery","(e-mail address removed),"Subject",text,...........
I don't have access at home. so I dont I cant remember exactly. But that is
it. What I want to do is have the use update the list of emails from the POC
table that is related to the Vendor table. Each Vendor can have multiple
POCs. I need to send just one email per Vendor in the Vendor table that is
sent "To:" all the POCs for that Vendor. I can modify the code you send to
fit my db. Any help with the logic would be helpful, as my next db requires
the same thing.

Matthew
 
John, Thank you, but I have been there. If I were just sending an email to
each recipient their code might work, but my situation is a little more
complicated. Any other references?
 
First, make sure that you know how to write code that sends one email
for each record in a recordset based on a query.

Then create a query on your Vendor table that uses the fConcatChild()
function at http://www.mvps.org/access/modules/mdl0004.htm to
concatenate the email addresses from related records in the POC table
into a single field.

Finally modify your code to use this query as its data source, with the
concatenated addresses in the To field.
 
Back
Top