Seeing as this is an ACCESS group, I'll stay with the Timer event on an
ACCESS form.
Create a form in your ACCESS database. Call it frmScheduler. In design view,
open Properties window.
Go to Event tab. Next to Open, select "[Event Procedure]" from dropdown
list. Then click on the three dots at far right side of box. That will take
you to Visual Basic Editor. On the blank line that is shown between the
Form_Open and End Sub lines, type this:
Me.Visible = False
Go back to the form's design view. On the Event tab, go to Timer Interval,
type 1200000 (this is the value for two minutes -- 60000 milliseconds).
(This will make your timer event run every 2 minutes.) Next to Timer, select
"[Event Procedure]" from dropdown list. Then click on the three dots at far
right side of box. On the blank line that is shown between the Form_Timer
and End Sub lines, type this (replace my generic names with your real
names):
If Abs(DateDiff("n", Time(), #TimeWhenSubNeedsToRun#) <=2 Then
Me.TimerInterval = 0
Call NameOfTheSubroutineThatNeedsToRun
Me.TimerInterval = 120000
End If
Save and close the form.
Go to database window and select Tools | Startup. In the Display Form/Page,
select frmScheduler from the list.
Now, whenever you open this database, the frmScheduler form will be opened
and made invisible. Every two minutes, its Timer event will run and test the
time. At the proper time, the code will run your procedure.
In WORD or EXCEL, you'd have to run code that would do a similar time test
and if correct, open an ACCESS database that has an AutoExec macro that runs
a function that calls the subroutine. That AutoExec macro also then needs to
close the database file. But, I would stick with what I show above; much
fewer moving parts.