[AccessD] Lock-screen inside an Access app

Heenan, Lambert Lambert.Heenan at AIG.com
Thu May 3 09:00:17 CDT 2007


Granted I may be an exception, but I don't find I have any problems running
a timer event all the time. The code I posted earlier is on a form with a 30
second timer interval and I don't have any flickering screens or other weird
things going on.

I long ago learned not to try writing code while a timer is running, and if
I ever forget then a quick visit to the immediate window to issue a
TimersOff command does the trick for me. Its compliment "TimersOn" reverses
the action.

Sub TimersOff()
Dim f As Form
    For Each f In Forms
        With f
            If .TimerInterval > 0 Then
                .Tag = str(.TimerInterval)
                .TimerInterval = 0
            End If
        End With
    Next f
End Sub

Sub TimersOn()
Dim f As Form
    For Each f In Forms
        With f
            If Not IsBlank(.Tag) Then
                If Eval(.Tag) > 0 Then
                    .TimerInterval = Eval(.Tag)
                End If
            End If
        End With
    Next f
End Sub


Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of JWColby
Sent: Thursday, May 03, 2007 9:38 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Lock-screen inside an Access app


>I'm a tad concerned about the timer continuing to operate while the 
>user is
using the app. Won't it interfere with things? 

YES, and that is one of the major design flaws in Access.  Timers ticking
cause issues with forms flickering, code compile errors for the developer in
design view etc.  Unfortunately that is what we are given to work with.
About the only thing that can be done is to try and set the tick to as long
an interval as possible.  For example, if the developer wanted to know that
a person hasn't done anything in 10 minutes then set the timer to every 10
minutes.  This is certainly preferable to setting it to every 10 seconds of
course.  Fire the timer at the slowest possible rate to perform the task.
<snip>



More information about the AccessD mailing list