Results 1 to 2 of 2

Thread: Hourglass

  1. #1
    Join Date
    Jul 2002
    Island of Dots

    Unanswered: Hourglass

    Does anyone know why, when I try to activate the Hourglass within a public function, it doesn't appear? Here is roughly what I've done:

    Private Sub abc()
    Call fPerformTasks(a,b)
    End Sub
    Public Functon fPerformTasks(a,b)
    DoCmd.Hourglass True
    'Peform various tasks...
    DoCmd.Hourglass False
    End Function
    Help much appreciated.

  2. #2
    Join Date
    Aug 2002
    Northampton, England
    Can't actually answer your question, but, here is a wait function directly from the Microsoft Knowledge base. Hope this proves to be of some use.

    '************************************************* *********
    ' Declarations section of the module
    '************************************************* *********

    Option Explicit

    '================================================= ==================
    ' NOTE: In Visual or Access Basic the unit of greatest precision
    ' is seconds. Therefore if the Timer is set to wait one second, the
    ' result could be a delay of anywhere from 0 to 1 second. If a higher
    ' degree of precision is required, another option is to use the Timer
    ' event of the form which has the ability to trigger every 1000th of a
    ' second.
    '================================================= ===================

    Function Wait (Delay As Integer, DispHrglass As Integer)

    Dim DelayEnd As Double
    DoCmd.Hourglass DispHrglass
    '(In Microsoft Access 2.0 and 1.x use: DoCmd Hourglass DispHrglass)
    DelayEnd = DateAdd("s", Delay, Now)
    While DateDiff("s", Now, DelayEnd) > 0
    DoCmd.Hourglass False
    '(In Microsoft Access 2.0 and 1.x use: DoCmd Hourglass False)
    End Function

Posting Permissions

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