Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2012
    Posts
    38

    Unanswered: Automatically Updating Command Button

    Hey guys! I'm new to the forum and I didn't find a topic that helped in the search function. Anyways:

    MS Access 2007. I'm trying to change a command button from refreshing "on click" to automatically refreshing at a set interval (say 10 min). Basically, manually clicking in the button updates new orders that have come in and I want it to do this without an employee having to click it.

    I've been playing around with it, and I assume this change should be made in the "Events" tab in the Property Sheet for this command button but I can't figure it out.

    Anyone know how to do this? This is one of my first experiences with Access btw (I've done a little more with Oracle sql developer).

    Thanks!

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    Welcome

    off the top of head

    in Design view on the form

    in the Events of the Properties of that windows You can set the Timer Interval then
    in the ON Timer Event put some code in there

    something like

    Me.Recalc
    Last edited by myle; 06-04-12 at 03:14. Reason: spelling
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Jun 2012
    Posts
    38
    Thanks myle. I'll have to check this out tomorrow (damn not having VPN).

    I was actually looking for something like "Timer" or "Timer Interval" but as I said I'm new to Access so I probably missed it.

    Could you explain that 'Me.Recalc' bit of the code a little more?

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Me.Recalc causes all Calculations within a Form to be...yes, you guessed it, Re-calculated!

    And 'order' Forms often contain said 'calculations!'

    Linq ;0)>
    Hope this helps!

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

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Jun 2012
    Posts
    38
    Thanks guys! Sorry it took me so long to get back to this thread but I want to type out my solution for others looking at this issue.


    What I did was:

    In the Form properties sheet: Timer Interval 600000 (milliseconds or 10 minutes) and On Timer [Event Procedure]

    in VBA code:

    Private Sub Form_Timer()
    *the event I needed to occur every 10 minutes*
    End Sub

Posting Permissions

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