Skip requery when tab is not active during timer function

Posted on 2011-04-20
Last Modified: 2012-05-11
I have a mult-tab form.  Each tab contains a form that queries different sets of data.  Each form is set to requery every 5 seconds (on timer me.requery, timerinterval = 5000).  There is a some overhead associated with each of these requery operations.  I would like to only requery the tab that is currently active (on top) and skip the requery if the tab is not active (since it can't be seen).

Is there some way to determine what tab is active from these forms on the tabs?

If so, I can skip the requery if the tab is not active (on top).

Any help will be greatly appreciated.
Question by:compuzak1

    Accepted Solution

    Never mind, I figured it out:

    To get the active tab from the forms on the tab:

        If Me.Parent!TabMasterCounts.Value = 5 Then
        End If

    tabs are numbered 0 (leftmost), 1, 2, ...

    Author Closing Comment

    Figured out the problem on my own

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
    In the article entitled Working with Objects – Part 1 (, you learned the basics of working with objects, properties, methods, and events. In Work…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now