Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Notification Month End 1

Status
Not open for further replies.

gleegeld

Programmer
Sep 5, 2002
14
0
0
US
Hi,

I need access to send e-mails at the end of the month listing all outstandjng unpaid invoices.

Any help would be great.


Thanks,
Candice
 
Just create your report based on a query that gets all the necessary records, then you can send it using the 'SendObject' method:

Code:
DoCmd.SendObject scSendReport, "UnpaidInvoices", acFormatHTML, "jr@aol.com;bigboss@ev1.net;mrT@flash.net", , , "Here are those unpaid invoices", , False

VBSlammer
redinvader3walking.gif
 
Thanks VBslammer,

Is there a way to have it be automatic, that is send the e-mail out every 30 days?


-Candice
 
Unless you have some kind of scheduler on your server to automate your database you'll just have to use an event such as a startup-form Load() event to check the date and launch the procedure.

I use a technique with my imports where I track all imports in a table that includes:

Date
Time
User
FileName
RecordsAffected
Success
etc.

Each time an import is performed (programmatically) the import table is updated to reflect the import, at which time the source file is renamed as a .bak file so it doesn't get imported twice.

You could use something similar so when the database opens, you check the 'emails' table to see if the last entry was 30 or more days ago. If so send a new email and update the table.




VBSlammer
redinvader3walking.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top