Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004

    Unanswered: Make table query to execute every 5 minutes

    I want to execute one make table query which has to put the data into MS Access table from linked MS SQL Server database based on group by clause, every five - ten minutes.

    I have huge MS SQL Server database, I linked it to MS Access database (one linked table). I made another table in MS Access which would be the destination table for mentioned make table query. The make table query should be executed against MS SQL Server database every 5 - 10 minutes.

    Already have everything but the timing mechanism. I do not think it can be achieved using macros. Only Visual Basic.

    Anybody has experience with something like this?

  2. #2
    Join Date
    Mar 2004
    Have a try with the OnTimer-property.

    To run a macro or event procedure when this event occurs, set the OnTimer property to the name of the macro or to [Event Procedure].

    See also the help file of MsAccess.


  3. #3
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    Here you go:

    Sub Form_Load()
    Me.TimerInterval = 300000 'Five Minutes (1000/sec)
    End Sub

    Sub Form_Timer()
    Place your Macro call here
    End Sub
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Oct 2004
    i always found it was easier to run a batch file from a scheduler...

    start /w msaccess.exe c:\database.mdb /x "MacroName"

  5. #5
    Join Date
    Mar 2004
    Timer, timerinterval, are there just for this reasons.

    I tried using them, but there's a lack of good examples at Internet.

    Anybody found good practice sites having examples about this?

  6. #6
    Join Date
    Feb 2004
    One Flump in One Place
    Nope - but so long as you are comfy with code and events you will do fine.

    You have two things to think about -
    OnTimer event fires everytime the timer "goes off"
    TimerInterval (in milli seconds) is how long between timer events (where 0 turns the timer off entirely).

    So - as missinglinq put it - set your timer interval to 3000 and your timer event will fire every 5 mins.

    Not much more to it You can look at the Access VBA help entry but you won't find much more there.
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts