Hi all,
I need to simplify an email process, here's the details.
A. Access2003 to develop for Access2000 and 97 distribution
B. Application is a deficiency tracker for over 172 different clinics for a LARGE L.A. area hospital.
C. Each clinic would receive a report for their unit only!, and we will send it through email automation (no touch)(Outlook).
D. Might only send one at a time but could need to loop through clinics
I have current working code where:
1. we select from a listbox passing a select case in the VBA to choose the right report etc.
2. send the report as an rtf document
3. pass stored recipients from the clinics table
4. fill in all related subject, and email.body info based on the clinic data and the report we are sending.
What suggestion could be made to...
1. Use one report and pass the clinicID# to the report from the Reports form when choosing the clinic, while only creating ONE access report. &
2. Saving that report without any additional user intervention {most likely opening the report in hiddenmode and saving > closing and then going into the email code and attaching there...}(to eliminate possible errors).
I don't see docmd.openreport doing it right off the bat. And docmd.sendobject acreport does not allow for passing the wherecondition, neither does the docmd.outputto code.
What combination or the sendobj, openreport, and or outputto would you follow? thanks
Donald M
I need to simplify an email process, here's the details.
A. Access2003 to develop for Access2000 and 97 distribution
B. Application is a deficiency tracker for over 172 different clinics for a LARGE L.A. area hospital.
C. Each clinic would receive a report for their unit only!, and we will send it through email automation (no touch)(Outlook).
D. Might only send one at a time but could need to loop through clinics
I have current working code where:
1. we select from a listbox passing a select case in the VBA to choose the right report etc.
2. send the report as an rtf document
3. pass stored recipients from the clinics table
4. fill in all related subject, and email.body info based on the clinic data and the report we are sending.
This works assuming I manage 172+ 'identical' reports and any additional reports for later implemented clinics. This I don't want to do.
What suggestion could be made to...
1. Use one report and pass the clinicID# to the report from the Reports form when choosing the clinic, while only creating ONE access report. &
2. Saving that report without any additional user intervention {most likely opening the report in hiddenmode and saving > closing and then going into the email code and attaching there...}(to eliminate possible errors).
I don't see docmd.openreport doing it right off the bat. And docmd.sendobject acreport does not allow for passing the wherecondition, neither does the docmd.outputto code.
What combination or the sendobj, openreport, and or outputto would you follow? thanks
Donald M