Report Auto Email (1 Viewer)

CCFL

Registered User.
Local time
Today, 11:29
Joined
Apr 23, 2010
Messages
19
On my report ("Yesterday Report"), I have a field ("Total") that should always be equal to 5. If it is less than 5; someone didn't clock out and I need to manually go in a fix it. This report needs to be emails as a PDF attachment nightly to Amy.

1) I was able to use SendOption to create the email to Amy. How do I make it automatic and set a time for it to send it? ... Perferrably sent daily at 12:02am.

2) Can/How do I add a conditional expression in it? ... If "Total" = 5; send to Amy@email.com. If "Total" < 5; send to me@email.com - so I can fix the report.

3) Do I have to add a SendOption button on the report? ...So when I do have to go in and fix the report, I can press it to auto send it to Amy. And it will look the same as if it was automatically sent; the only difference will be the time it was sent to Amy.

I have looked through the other Auto Send/Report Email/etc... threads on this site and on the internet. But, I couldn't find anything that hit this problem on the head. I hope I explained it in enough detail and clear for you all to understand. If anyone could help or shade some light on this I will greatly appreciate it. Thank you all in advance for reading and assisting me with my issues.

XOXOXOX - CCFL ;)
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:29
Joined
Aug 30, 2003
Messages
36,134
I would probably create a stand-alone mdb/accdb that performed this function when it started, then closes itself. Then I'd call that db from Windows Scheduled Tasks. Your other option is leaving the db running and using the timer event of a form to run the process at the desired time.

You could use SendObject in VBA (or a macro) to send the report. You can probably use a DLookup or DSum on the report's source query to determine who to send it to.
 

Perissos

Registered User.
Local time
Today, 11:29
Joined
Jun 28, 2010
Messages
61
You should also try to handle what will happen if its >5. Not that it ever will be, but its always better to expect the unexpected than not.
 

Users who are viewing this thread

Top Bottom