Microsoft Access
--
Questions
--
Followers
Top Experts
Print same Report to pdf and e-mail in succession with (report parameters - pdf filename - e-mail address) in a table
This is a tall order that my boss has given me.
I have a form called MainForm with text fields for StartDate and EndDate. There is also a button for printing a report. The report is supposed to get parameters from a table that has the SalesPerson code, e-mail address, and a pdf filename (ex: COPerfSheet.pdf). My boss wants me to print a separate report for each SalesPerson code, print it to a uniquely named pdf file and then e-mail it to the address in the table. I have Access 2003, Outlook 2003, and Adobe Acrobat 5.0 (full version). Can someone help me figure out if I need VBA code to do this and how? I am only a beginner at VBA and this has me pretty frustrated...
Thanks in advance,
kaprmg
I have a form called MainForm with text fields for StartDate and EndDate. There is also a button for printing a report. The report is supposed to get parameters from a table that has the SalesPerson code, e-mail address, and a pdf filename (ex: COPerfSheet.pdf). My boss wants me to print a separate report for each SalesPerson code, print it to a uniquely named pdf file and then e-mail it to the address in the table. I have Access 2003, Outlook 2003, and Adobe Acrobat 5.0 (full version). Can someone help me figure out if I need VBA code to do this and how? I am only a beginner at VBA and this has me pretty frustrated...
Thanks in advance,
kaprmg
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
ASKER CERTIFIED SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
This code really helps, but I need a little more guidance. The code prompts for a filename and I don't have the time to name each pdf.
How would I modify your code to go through columns named [Salesperson], [PdfName], and [Email] and to automatically run the report for each record (a single report for each record), auto name the pdf, and auto e-mail the report?
Thanks,
kaprmg
How would I modify your code to go through columns named [Salesperson], [PdfName], and [Email] and to automatically run the report for each record (a single report for each record), auto name the pdf, and auto e-mail the report?
Thanks,
kaprmg
Sorry for the daley on responding but I've been away...
Did you come up with a loop to name the file and then email it?
Did you come up with a loop to name the file and then email it?
No, I have not.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Microsoft Access
--
Questions
--
Followers
Top Experts
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.