trigger email

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have an Access training database recording expiry dates for
certificates/licences etc. My boss would like me to implement an email
trigger which is going check that someones licence expires this week and send
her an email to remind her to follow it up. Thing is she doesn't want to
have to remember to open the database each week. It has to do it all on its
lonesome. While I believe I can code a check of the expiry dates and an
email with the appropriate detail. What's the best way to get this happen
without opening the database.

Thanks
 
ei,

Presume you want it to run once a week say the Friday of the previous week.

Write a database that opens a form (that is based on the query of expiry).

Write a procudure that emails each occurance when all have been sent add
into procudure exit database.

when all this is done add the (weekly).mdb file to one machine and add it to
the scheduler
look in (Programes,Accessories, system tools) and run it when u want
 
Teewan,
You can use Windows Task Scheduler. Place your database on a server with a
BAT file that will open and execute the code within the database. Use the
Windows Task Scheduler to execute the BAT file every day, every week, every
month, every hour or how ever often it needs to. Open notepad and type in the
location of your database between quotes and then save it as whatever.bat
like
"C:\Program Files\ProgramFolder\Database.mdb" then set up Windows Task
Scheduler to run whatever.bat how ever often you want it to execute the code.
This is if you have a macro called AutoExec in the database to run the code
you want. Or you can specify within the BAT file which macro to execute. Lets
say your database has several macros for automation at different times. You
would then specify which macro to run by name in the BAT file like
"C:\Program Files\ProgramFolder\Database.mdb" /x "MyMacro"
Hope This Helps! Take Care & God Bless ~ SPARKER ~
 
I would implement this via Outlook. I just tried getting into the
Outlook Object Model for more specifics, however my Norton has disabled
Outlook VBA. Basically, I would create a custom form for a TaskItem that
contains a command button to automatically execute the code. The custom
TaskItem form would be used for the TI's related to sending the emails.
When the reminder for the TI fires, the user opens the item and hits the
button. It *MIGHT* be possible to further automate this as I believe
that there is an onReminder event, however I can't confirm that as yet.
The code to actually reach out to Access is fairly straight forward.
Also, by using TI, you can assing the task item to the persons involved
and then monitor when they complete the training.
 
Actually, I was just able to get into the Help file...

There is a an event (ReminderFire Event) that fires when the reminder
fires. This would enable you to run the code automatically. So then, I
would create a recurring TaskItem - "Send Email or Whatever", assigned a
due date and assigned to a specific category - AutoGenerateEmail. You
would then code the ReminderFire event to check the category and if the
task is in the AutoGenerateEmail then run the code. The nice thing is
that the code SHOULD run wether or not the person is present at the desk
- as long as Outlook is opened. If you get to a situation where Outloook
isn't opened for a few days and the date due passes, the reminder will
still fire.
 
BTW - Its the TaskRequestItem that would be used to send the reminder
and have it show up as a task (as opposed to the MailItem).
 
Back
Top