Link to home
Create AccountLog in
Avatar of Erin_J
Erin_JFlag for United States of America

asked on

MS Access send email notification

I currently have Office 2007
Right now I have a query linked to a report and when I open MSAccess it will send a email notification in the form of a pdf of any vehicles in our fleet that need Registration, Inspection, many other regularly scheduled maintenance issues.
This is the first of 2 issues I am trying to resolve:
1.  I'd rather the information be part of the body of the email not as attachment.

Such as:
The following vehicles are scheduled for maintenance

Any thoughts?
Avatar of p912s
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Hopefully the above example helps as I'm not able to open your database from my current location.

Does the above make sense?


Avatar of Erin_J


I'm trying to understand it but it's gonna take me a little bit to figure it out.  Questions pending....
If you can post the sub that is sending the message it will be easier to help adapt with the coming questions.

Avatar of Erin_J


Can I give you some more info and see if you can make it a little easier on me?
My query name is: Reg Due
the control fields in that query I need to reference are: FleetId, Description, Reg (just three for now I'll add more later)
Avatar of Erin_J


Sorry Scott I'm a novice here.  "post my sub"  currently it's in a macro.  I'm trying to figure out how to post it.
>>currently it's in a macro
Like a macro from the category menu? Not code in a module?

Not sure how you would do it using the built-in tools like that. Because you need build the message body and the message; which is what my code above does.

Unfortunately it's been a long day for me and I'm off to bed...

Avatar of Jeffrey Coachman

The code p912s posted will "List" the Data  in the email body.
This may be the most straightforward option.

If, on the other hand, you need to see the actual formatted "Report" in the body of the email, ... then this is a bit trickier.

You can't easily "insert" a PDT into an email body.

What you would have to do is to convert the output to a HTML file, then read that file into the "HTMLBODY", line by line.

It might be easier to convert the PDF to an image and insert that into the email body...

We offer a commercial Access email program that will let you send customized text and HTML messages and attach PDF reports filtered for each recipient. The email blast can work off your query. It can all be done without writing any code. To avoid any accusations of advertising, please request more information and I'll provide it. Thanks.
Avatar of Erin_J


I think 912s answer serves me best I'm just having trouble implementing/figuring it out.  Thanks for the comments.

I'm at a client site all day today. Should have time this evening to answer follow-up questions.

Please update what you've tried and where you're stuck and I'll check back tonight.

Avatar of Erin_J


Thank you
You're welcome!