none
Event Timer Freezes randomly RRS feed

  • Question

  • Have a Access form that processes a sub routine every 15 seconds. The Event Timer is set for 1 second and the I have it display a counter that counts down from 15 seconds. What randomly occurs is that the Event Timer stops/freezes, once you move the mouse or hit a key on the keyboard it continues. It sometimes happens within a few minutes or sometimes it will work for days/weeks then stops/freezes. It happens during the Event Timer, not during the processing of the sub routine.

    It helps if the Task Manager is open and minimized but the freezing will still reoccur. Also tried running a task within Scheduled Tasks, but the it still doesn't prevent the freezing.

    Happens in Access 2007 and 2013.

    Is there are permeant solution or work around?

    Monday, May 15, 2017 6:49 PM

All replies

  • Have you compacted your database?
    Does your code compile without errors?

    Is your database in mdb or accdb file format?
    What is the size of your database?

    Is your database split?
    Are multiple users using your database or is this just for your use?

    We'd also need to see all the code involved to perhaps be able to offer some advice.


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net


    Tuesday, May 16, 2017 12:39 AM
  • Hi CVC Systems LLC,

    it looks like you are using Timer Event of the form.

    so first I want to suggest you to install latest updates if available.

    so if there is something wrong with the old updates then it can be corrected by new updates.

    if that not solve the issue then try to use the function like below.

    Public Function Pause(NumberOfSeconds As Variant)
        On Error GoTo Error_GoTo
    
        Dim PauseTime As Variant
        Dim Start As Variant
        Dim Elapsed As Variant
    
        PauseTime = NumberOfSeconds
        Start = Timer
        Elapsed = 0
        Do While Timer < Start + PauseTime
            Elapsed = Elapsed + 1
            If Timer = 0 Then
                ' Crossing midnight
                PauseTime = PauseTime - Elapsed
                Start = 0
                Elapsed = 0
            End If
            DoEvents
        Loop
    
    Exit_GoTo:
        On Error GoTo 0
        Exit Function
    Error_GoTo:
        Debug.Print Err.Number, Err.Description, Erl
        GoTo Exit_GoTo
    End Function

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 16, 2017 3:01 AM
    Moderator