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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automatic email from access

Status
Not open for further replies.

ajdesigns

Technical User
Jan 26, 2001
154
GB
I have a form where I enter projects to be completed by a specific date all data from this form gets entered into a table with fields project_no, date_initiated, project_ leader, project_description, completion_due_date, Completed_Y/N.etc.
I also have another table that contains all the project leader names along with email address's.
Is there a way that if a project has not got a Y in the Completed_Y/N field by "current Date" that access can automatically email the project leader with the body of the mail consisting of something like "this project (project no ) is over due,please complete ASAP.
 
Hi
You will need a recordset very roughly like:
[tt]"SELECT tblProjects.project_no, tblProjects.project_leader, tblProjects.project_description, tblProjects.completion_due_date, ... , tblProjLeaders.Name, tblProjLeaders.Email FROM tblProjects INNER JOIN tblProjLeaders ON tblProjects.project_leader = tblProjLeaders.project_leader WHERE tblProjects.completion_due_date <#" & Date & "#"[/tt]

You can then loop through the recordset:
[tt]strBody=rs!project_description & " was due on " & rs!completion_due_date & ". Where is it?"
DoCmd.SendObject acSendNoObject, , , rs!Email, , , rs!project_description, strBody, True[/tt]
You will find a gret deal of information on turning the above into code in these fora.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top