Sending email (1 Viewer)

majhl

Registered User.
Local time
Today, 03:22
Joined
Mar 4, 2008
Messages
89
I have a difficult problem with a database. We have patients from multiple GP Practices. We need to send these practices a report with the results for their patients, say on a monthly basis. There may be up to 80 practices.

I think I understand how to, say, send one email containing one report to one practice, or one email containing one report to many practices, but to send an individually tailored report/email to eighty practices has me stumped.

Would I need to create 80 results reports? How would I loop through the recordset of 80 practices?

If anyone has any pointers I would be really grateful.
 

Mr. B

"Doctor Access"
Local time
Today, 05:22
Joined
May 20, 2009
Messages
1,932
You can use VBA to open a record set of the patients for whom you need to send a report to a GP Practice. Then you would iterate through each of the records returned in that record set, preparing the report and attaching it to the email.

This can sound simple enough but will require VBA coding to get each custom report for each patient created and then have the email created and sent to the appropriate GP Practice.

Take a project like this one step at a time. Start by creating the record set of the patients for whom the reports need to be created. Once you have that set of records you can then create the code that will move through each of those records one at a time. Then you move along to the next step in the process. Eventually you will have the entire process working.

I would suggest that you start with a small record set by putting some kind of criteria in that would only return a few records so you don't have to try to deal will many, many records while in development. Then you can remove that restricting criteria once you have your process defined.

Hope this gives you some help and gets you moving in the right direction.
 

Users who are viewing this thread

Top Bottom