Run code every 5 minutes

mike wild

Registered User.
Local time
Today, 20:32
Joined
Feb 16, 2003
Messages
69
I have the following code i would like to run every 5 minutes

DoCmd.RunSQL "DELETE * FROM data;"
DoCmd.RunSQL "DELETE
  • .song1 FROM

    • WHERE ((
      • .song1 = ""!F:""))"
        DoCmd.RunSQL "UPDATE list SET list.song = Mid([song],2)"

        At the moment the code is on command "button19"

        Q. How would this be achived using vba? And where would the code go?
 
You could use a timer control to run it every 300 seconds
 
I'd also just make these queries in the database and save them - they don't need to be created in VBA each time.
 

Users who are viewing this thread

Back
Top Bottom