January 7, 2004 at 9:13 am
We have a system that tracks required employee trainings. I need to send emails to the employee's manager once a month that details what trainings each employee needs to do and by when. I have a nice report in Access (raw data are in Oracle) Is there a nice way to generate this email in access. I see the sendobject command, but I am unsure how to dynamically generate the objects for 70 different managers.
Any ideas? Should I get this out of Access and use something else?
January 8, 2004 at 5:52 am
Here is how I do it:
DoCmd.SendObject acSendReport, ReportName, acFormatSNP, TO,CC ,BCC , EmailSubjectText, EmailBodyText, False
I use an ado recordset as the source for recipients and a query for the recordsource for the report. Loop through the recordset, when you get a hit call the function containing the above command.
The trick is setting the filter property of the report in the OnOpen event. I have used a global variable to supply the filter criteria from the ado recordset, but there is probably a more elegant way to do it.
Cheers
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply