Email current recordset as PDF in a access form

I have this form called AVR and I wanted to add a button called  (EMAIL ENGINEERING) to select for the engineer name from tbl_ENGINEER_NAME to send the current record set as a pdf.

See attachment....
--ana-file-01-wfp-users-lfreund-TO.accdb
LUIS FREUNDAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MASEE Solution Guide - Technical Dept HeadCommented:
Hi LUIS FREUND,
I suggest create a report as per your rquirement and use this code and send that report as attachment.
Please check this. I am not at desk to create all these. I have limited access now. Please check the codes and make changes according to the notes.

Thanks
MAS
--ana-file-01-wfp-users-lfreund-TO.accdb
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
As indicated, you should create a report, but the attachment by MAS doesn't seem to show code how to do that, or how to email a report.

You can send a report as an Email like this:

DoCmd.OpenReport acSendReport, 'Your Report Name", acFormatPDF, "janedoe@doe.com", , , "Your Subject", "Your Body", True

Here's more information about the Sendobject command: https://msdn.microsoft.com/en-us/vba/access-vba/articles/docmd-sendobject-method-access
0
mbizupCommented:
No points please - I think the DoCmd.OpenReport in Scott's comment above is a typo.  It should be DoCmd.SendObject, as in his MSDN link.
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Thanks Miriam - that was a typo!
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
The correct way to do this is to create a report, and MAS suggested this, along with a sample file. My comment provided additional commentary and links to relevant material.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.