Actually, what I'd do is create a macro that executes code in a module. Then
I'd create a CMD file which runs Access via the command-line. In that
command-line, you can specify what to execute when the application starts.
Once you know THAT works, add that CMD file to Windows scheduler to run every
day at a predefined time. That way, YOU never have to touch it. It's all
automatic. You could even code it up to send YOU an email every time it runs,
letting you know that it DID run and complete successfully.
I can't write your code for you. You have the tables in-hand (I don't), and
an example of how to do VBA-based ADO table lookups (per my earlier post on
this thread). Armed with that information, you should be able to write a few
SQL queries to open RecordSets that qualify for email notices. Use the
DateDiff function to determine the 30-day window.
Really, that's all there is to it.
- What is "today's date"?
- What date is 30 days ago from today?
- Lookup all emplyees whose review due-date is > the 30-days ago date and <=
today
- Create the email and send
- Set a "was an email sent?" flag in the employee table to YES so they don't
get an email every day, but just once
- Clear the flag and reset the review due-date once the review has been done