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....
Who is Participating?
MAS (MVE)EE Solution GuideCommented:
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.

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, "", , , "Your Subject", "Your Body", True

Here's more information about the Sendobject command:
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.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Thanks Miriam - that was a typo!
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.