- Local time
- Today, 00:24
- Joined
- Feb 19, 2002
- Messages
- 43,474
Access Diva Looping Records to Send eMail
Access-Diva provides custom databases using Microsoft Access utilizing SQL Server when called for.
www.access-diva.com
If you have more than a couple of emails to send, I would not use the PDF method as written. There is a lot of extra overhead involved with opening the report first in order to get it filtered before converting to a PDF and then sending the PDF. The method I use does NOT require opening the report first and so is far more efficient for large mailings.
I use a hidden field on a form. As I iterate through the loop, I populate the hidden form field with the filter value. Then the Report is bound to a query that has a where clause that looks at the hidden form field:
Where SomeID = Forms!YourForm!txtHiddenSomeID
The problem is caused because the OutputTo does not have the same ability of the OpenReport method to provide where arguments on the fly. That is why the hokey and inefficient method is used in a lot of samples when sending PDF's.
Last edited: