Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 14th, 2007, 04:50 PM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automated Email from Access Database

So after many instances of finding the info I needed already posted to this site I finally must ask a question :). Thanks in advance for any help.

I am attempting to automate a process where emails are sent weekly listing employees that have not had a forklift safety course within a year. Our training records are housed in an access database and I have the query to list those employees that are due for refresher. What I am comlpetely lost on is what to use to check this query and email the contents on a weekly basis.

Again thanks for your help! Also, I am not necessarily looking for a detailed solution (although I would not be upset) but if someone can point me in the right direction I should be able to run with it.

Thanks,
Patrick
 
Old June 15th, 2007, 10:43 AM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Assuming you already have email capability built into the database, one solution I have used for a problem like this in the past is to have a table that stores the date that the notifications were last sent out. Then in the startup form of the database, put in some code that, for instance, says:

If this is Monday, do a lookup of the date table.
If the date in the table is today, then do nothing - the emails have already been sent.
If the date in the table is not today, then send the emails and update the date in the table to today.

That way, the first person that enters the database on a day when the emails are supposed to get sent will trigger the process. You might also want to display a message that the process is ongoing, otherwise the person will think the database is hanging. Also, instead of checking for a particular date, you can check to see if it has been greater than 7 days since the emails have been sent.

If you don't have email capabilities set up, I think the MAPI code to do this through an exchange server is on the forum somewhere.

 
Old June 18th, 2007, 08:37 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

If you need actual code, I can post code I use for a GroupWise mail server, or you can do a search at Microsoft for email code for Outlook / Exchange, for example. If that is not the issue, do you have the code worked out to trigger the emails on a regular basis?


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Automated email ashik112 Classic ASP Professional 3 March 14th, 2007 11:11 PM
Re: Database automated email spinout SQL Server 2000 4 March 5th, 2005 10:49 AM
Database Write and Email inquiringminds BOOK: Beginning ASP 3.0 9 September 21st, 2004 06:33 AM
Q. How do I access my email with PHP? richard.york PHP FAQs 0 April 8th, 2004 09:51 PM
Sending an automated email luxx Excel VBA 4 January 2nd, 2004 05:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.