Run code every 15 minutes

K

Karren Lorr

Hello

Is there a way to run a set of codes every 15 mins.
eg.

Private Sub FormButton_Click()
Do something here
wait 15 mins and then repeat the Do something here
end sub

Thank you
 
D

Daniel Pineault

At the opening of your database, open a form in hidden mode and use the timer
event with a 15 mintue loop.

But I have to ask, what need to be run every 15 minutes?
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
K

Karren Lorr

use the timer
event with a 15 mintue loop.

How do I do that please

The code is like this

If me.textbox = "abc" then
Do something
and quit
Else
Wait 15 mins then check text box again
end if

I have another set of codes that will search various other windows
appications for text strings and, if they are there, insert them into the
text box. If they are not there then I want to check again in 15 mins.

If you're really interested - the MD has asked me to set this up this
weekend as someone is (shall we just say) miss-using the systems we have
here.
 
W

Wayne-I-M

Have I had a name change ??????


Oh well
Is there a reason why you can't use the form's timer control

from the real :) me
 
K

Karren Lorr

Sorry about that :)
I have incorporated your Google Maps in Access module and I copied it this
forum and pasted it but the end few lines were still there. Can’t into detail
but I have set up a map with a pointer to show where the miss-use is taking
place.

I am still un-sure about how to use the form’s timer. Could you give more
details please?

From the real Karen :)
 
J

John W. Vinson

Hello

Is there a way to run a set of codes every 15 mins.
eg.

Private Sub FormButton_Click()
Do something here
wait 15 mins and then repeat the Do something here
end sub

Thank you

Open the form in design view and choose the Timer event. Edit your "do
something" code into that event.

Your form button would just set the form's Timer property to 15 minutes, in
milliseconds. Your click code could be:

Private Sub Form_Button_Click()
Me.Timer = 1000*60*15
Call Timer ' to have it "do something" the first time
End Sub

You'll need some way to turn it off (by just setting the form's Timer property
to 0).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top