make query run automatically

  • Thread starter Jean-Francois Gauthier
  • Start date
J

Jean-Francois Gauthier

Hi there,

I was wondering if it is possible to make an Append-Query run on its own,
lets say every minute or every 5mins, 10 mins, whatever the case.

The reason why I ask is that I have a table that has all the info relating
to an entry that is required. These entries are later bundled together. I
therefore have a bundle table where I have a bundle number, count of number
of records in bundle, document type, department and person assigned to. I
would like this append-query which is updating my bundle table to run
regularly and therefore keep this table up to date. Is this possible?

Thank you.
 
M

Michel Walsh

You can use a timer under a form, assuming Access is continuously open.



Public NextTime AS Date ' in the declaration section of the form


Private Sub Form_Timer()
If(Now() < NextTime) exit sub

DoCmd.RunSQL "INSERT INTO...."
NextTime = DateAdd("n", 10, NextTime)
End Sub




Just be sure to set the timer interval to something else than 0 msec.




Hoping it may help,
Vanderghast, Access MVP
 

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