Transfer results from queries to auto-email

Moose3

New member
Local time
Today, 10:52
Joined
Oct 28, 2010
Messages
4
Hey Everybody,

I wanted to see if I could get an auto-email created using the results of a couple queries. On a weekly basis I would like to send an updated email (automatically) pulling 4 or 5 fields from 4 separate queries.

I can do a Make-Table and 3 appends to get them all in 1 Table but I would rather have them separated in the email. I would like the body to look like this:

Projects Completed:
Project# Client Date Completed
12345 Acme Inc 1/1/2010

Projects Past Due:
Project# Client Date Due
54321 ABC Co 1/1/2010

Etc...

These are the fields I already have set up in my queries. I know I can transfer them to an excel doc and just attach that to the email, but I would rather have it printed in the subject of the email if possible. I have the auto email set up and working, just need to get the query results to transfer to the body of the email.

Thanks in advance!!!
 
Is there a way to run this email reminder upon a new form creation via the Access's "Record" buttons on the bottom of the window... rather than being constrained to pressing a button on the form?
 
Well, the current event fires when the user changes records, including via those buttons, but code would then be referring to the newly displayed record, not the one the user just left, which I suspect is what you want. How's that for a run-on sentence? :rolleyes:

Presuming you want to deal with the record just added or modified, try the after insert or after update events.
 
Just create string variable and export data from queries into string and arranged the way you want with loops. I usually email whole report as PDF and just info in email subject/body.
 

Users who are viewing this thread

Back
Top Bottom