RE: Sending Email to multiple recipients
- From: Gary Dolliver <GaryDolliver@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Jun 2007 07:40:01 -0700
Thank you Dale!
This gives me quite a bit to work with. If possible, would you be able to
show me how to set up the recordset and the loop?
I am using a query (Ship_Confirmation_Email) to gather the recipients info
(ShipTo_email and TrackingID) and bring it into the report
(Production_SHIP_CONF)
- which is run from some SQL (joined with the above query). I am hoping to
have this email function ran from a single button click, or possibly a Timer
Event (which would work better) - I know it will ask me to click to send the
email for each as I am currently using SendObject as an Order Received
Confirmation (which works better as it fires once an order is received, but
since we do massive shipping, it would not work on the shipping side)
I think I understand what you are saying, but could you possibly detail it
out for me? I am not the familiar with loops yet.
Thank you so much
"Dale Fye" wrote:
They way I have done that in the past is to create a recordset in my code.
with the account number and email addresses of my report recipients.
2. Next, I add a textbox to my form (give it zero width if you don't want
to see it) and I use some code in the reports query that checks to see
whether that textbox is filled in, something like:
WHERE Forms(myForm).txt_acctno = rs("acctno")
OR Forms(myForm).txt_acctno IS NULL
3. Then I loop through the recordset, populate the textbox (txt_acctno)
with the rs("acctno") value, then send the report using sendObject. Keep in
mind that with the new Office security patches, you will get confirmation
messages for each of these (although I hear there are ways around this).
HTH
Dale
"Gary Dolliver" wrote:
Hi all,
I am wanting to send shipment confirmation emails to customers - usually
will be about 10-15 per day, all at once. I currently have a query that shows
the records of those that will need the email sent to them, and tie it in to
a report that operates off of an SQL line (instead of a saved query) that
shows the correct recipients as well. How would I set up VBA (using
sendObject?) to go through this report and send each customer their own
confirmation? As the report currently breaks per customer, would the email
do the same? Any assistance or code samples would be very helpful.
Thanks!
-gary
- Follow-Ups:
- Re: Sending Email to multiple recipients
- From: Rick A.B.
- Re: Sending Email to multiple recipients
- Prev by Date: library inventory control
- Next by Date: Color Scheme, alternatives to the three?
- Previous by thread: library inventory control
- Next by thread: Re: Sending Email to multiple recipients
- Index(es):