Batch Email processing

C

Chip

I'm not sure anyone is reading my postings but I'll try again. I
think it might be because I'm using Google.. Anyway, in my
application, on each record, I have the ability to send a deliquency
notice. I have a button which creates the report, sends it as a
PDFattached to an email, notes the date and works awesome.

Now, in an effort to streamline even further, I'd like to hit one
button, on a switchboard, which will do that function for every record
that needs it. I can create the query of the records that need this
done, but I dont know how to set up the SendObject to loop through all
the results from the query.

Additionally, I'd like to then SetValue of the Date Control to today,
and Email Sent (which is a check box) to Yes...

Any help would be great appreciated...

Chip
 
D

Dave C

If I were doing it, I'd write VBA code to do it all in the background.
That'd be difficult to show without more specifics about what your code looks
like.

Here's one solution to simply loop through the records on the form and do
the updates. The users will see the records moving, but it'll work.

You indicate you already have a button that sends the email correctly for
the record that's being displayed. In my code, I assume that button is
called SendEmailForThisRecord. I also assume you have some way of
determining that an email needs to be sent for certain records.

private sub SendAllEmails_click()
with me.recordset
.movefirst
while not .eof
if me.DaysSinceLastPayment.value > 30 then
call SendEmailForThisRecord_click()
end if
.movenext
wend
end with
end sub
 

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