Results 1 to 4 of 4

Autorun macro on timed intervals

  1. #1
    Sunshack is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018

    Autorun macro on timed intervals


    I am not by any means an advanced Access-user, but I make some basic queries, tables, macros that me and my co-workers use. I have a database that works like a "monitor" for our system, and every time a macro is ran, it will add a log into a table.
    It would be extremly helpful, if i somehow could make this macro run every 30 minutes as long as the access database is open.

    Is there a way to make this happen? I have tried to google around, and it seems like it would be possible with "visual basic". But i dont understand any of that sadly

    Please help!

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    make a form, add a check box: chkTimer
    in the form property set the TIMERINTERVAL = 0
    the timer runs on ticks (millisecs)
    1 second = 1000 ms
    so 30 min = 1800000

    in chkTimer.afterupdate event , to turn the timer ON

    If chkTimer.Value Then
      Me.TimerInterval = 1800000
      Me.TimerInterval = 0
    End If
    in the form property ON TIMER, (this is what runs when the timer hits its count)
    run your event; either macro or query

    Private Sub Form_Timer()
    docmd.runMacro "mAddRecord"
    End Sub
    be sure the macro turns off warnings or youll get that dang message box
    setwarnings false

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    The Great Land
    In the AfterUpdate event property select [Event procedure] then click on the ellipsis (…) to open the VBA editor. Type code in the event.
    How to attach file: To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Sunshack is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Worked like a charm! Thank you so much!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Autorun of Spell check
    By Topflite66 in forum Forms
    Replies: 10
    Last Post: 04-04-2018, 01:50 PM
  2. Timed Macro
    By RayMilhon in forum Macros
    Replies: 2
    Last Post: 08-14-2015, 10:45 AM
  3. Timed Reminder Box; Event Timer?
    By WEJ in forum Access
    Replies: 6
    Last Post: 05-26-2013, 02:12 PM
  4. Timed Pop up reminder
    By Kananelo in forum Programming
    Replies: 1
    Last Post: 03-02-2011, 11:07 AM
  5. Timed events
    By summitrider in forum Access
    Replies: 2
    Last Post: 08-14-2008, 03:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Tech Forums: Microsoft Office Forums