Access "frmRunningQuery" test box not working correctly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anoble1
    New Member
    • Jul 2008
    • 246

    Access "frmRunningQuery" test box not working correctly

    I have a report that takes a long time to open. I have decided to add a form that comes up right before the code starts that says Running Query.

    I never can get the form to view "All the Way". It will come up, but the focus is on the code running and you can only see the top of the running query form. Is their someway to (set the focus) to that Running Query form and have the other stuff run behind it. instead of vise versa?

    Example, the form comes up, you will see the Caption of the form that says "Running Query" very samll in the upper left hand corner like normal. But the Form is blank, or shows blank when running the report. When in fact it says "Running Query" in big red letters.

    Thanks,

    I'm using the:
    Code:
    DoCmd.OpenForm "frmRunningQuery"
    Then the report starts it's stuff
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #2
    I use some code like this in my form's Timer event procedure :
    Code:
    Private Sub Form_Timer()
        Call DoCmd.SelectObject(ObjectType:=acForm, ObjectName:=Me.Name)
    End Sub
    Bear in mind that other running code can stop this from triggering unless the DoEvents() command is run periodically.

    Comment

    • anoble1
      New Member
      • Jul 2008
      • 246

      #3
      Sorry, I'm a little new to this. I copied what you had above:
      Code:
      Private Sub Form_Timer()
            Call DoCmd.SelectObject(ObjectType:=acForm, ObjectName:=Me.frmRunningQuery)
        End Sub
      How do I call it into the report before the code starts to run?
      Or do I just take out the Private sub and just do the SelectObject?

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        Originally posted by ANoble
        ANoble:
        How do I call it into the report before the code starts to run?
        Not sure what this means O.o.

        What you need to do to use this isto post my code (not your changed code if you want it to work) into the module of the form [frmRunningQuery] and then set the form's Timer Interval property to something like 500 (milliseconds) so that the form makes itself selected every half a second.

        If that answers your question then good. Otherwise, please ask again, but making clear sense is always good.

        Comment

        • anoble1
          New Member
          • Jul 2008
          • 246

          #5
          I don't know how I missed this when I was searching the first time...



          This answers everything, plus future ideas. Thanks @NeoPa!

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32633

            #6
            Ah good. It's always cheering to know that people find what you do helpful. Have fune with it :-)

            Comment

            Working...