Does anyone know how I could automate a macro so it runs based upon what time it is? I would like to make a macro run every five minutes. Sounds easy, but I haven’t found a way to actually do it.
If you have a form that is always open as long as the application is running, you can set this up via its Timer and TimerInterval properties. Specify the macro (or function) name in the Timer event, and set the Timer Interval to 300000 (in milliseconds, which equals 5 minutes).
If you don’t have such a form (and it would be intrusive to your application), then you can create a “dummy” form and use an AutoExec macro (or Visual Basic code) to set its Visible property to False.
Forms have a TimeInterval property. If you set this to 5 min, you can then set the OnTimer property to run your Macro.
Look up both of these properties in the help section. It shouldn’t be too hard.
BTW - I’m sure there’s a more elegent solution, I just don’t know it.
DAMN!
RedNaxela beat me to it!
I just tried this and HEY - IT WORKS!!!
NOW I CAN RULE THE WORLD!!!
(Anyone else ever felt this way after overcoming a difficult Access problem?)
Thanks RedNaxela.
Zoid, what is inelegant about this? If need be I can open a form in the hidden window mode so nobody is the wiser. All the better for my diabolical plans…
Bighead-If this makes you feel like you can rule the world, then I can only imagine what you would feel like if you ever put together a “cool” database. You probably have some genius of a mastermind helping you at your job or something. Come out of the closet man!
Pay no attention to Moss Man. He knows damn well I taught him everything he knows about Access.
Oh yeah well “Do it”!