[AccessD] Form flashes on timer event

Rocky Smolin at Beach Access Software rockysmolin at bchacc.com
Wed Apr 2 08:04:40 CDT 2008


Gustav:

I'll try that.  Oddly, it doesn't flash in A2007.  First time I've found
something that works better in 7 than 3.

Thanks.

Rocky
 




 	
	

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Tuesday, April 01, 2008 11:31 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Form flashes on timer event

Hi Rocky

First, I have a form with a similar function but updates are limited to
every 10th second:

  If DatePart("s", Time) Mod 10 = 0 Then
    mdblTotalHours = mdblTotalHours + ((Me.TimerInterval / 1000) / 60) / 60
    Me.txtElapsedHours = DecHoursToHMS(mdblTotalHours)
  End If

This works fine but it is not A2003. 

Second, create a new form with only this function. If it does not flash,
something else is forced to update on your form in question and you will
have to locate that.

/gustav

>>> rockysmolin at bchacc.com 02-04-2008 01:56 >>>
Dear List:
 
I've got a fairly complex bound form (no sub forms, though) with a timer on
it to keep track of elapsed time (timesheet form for a law firm).  SO they
can start and pause and cancel the timer with a couple of button.  And it
shows the elapsed time.
 
The timer interval is set to 1000 and each time the timer event fires the
screen flashes like it's being repainted.
 
Here's the code snip:
 
Private Sub Form_Timer()
 
If boolTrapErrors = True Then On Error GoTo Err_Form_Timer
 
    mdblTotalHours = mdblTotalHours + ((Me.TimerInterval / 1000) / 60) / 60
    Me.txtElapsedHours = DecHoursToHMS(mdblTotalHours)

where Me.txtElapsedHours  is obviously the box where the elapsed tiem is
being displayed.  
 
This is legacy code.  DecHoursToHMS is a function:
 
    DecHoursToHMS = Format(dblHours / 24, "HH:MM:SS")

Is there a way to stop the flashing?  A2K3 BTW.
 
MTIA
 
Rocky



--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.4/1355 - Release Date: 4/1/2008
5:37 PM
 




More information about the AccessD mailing list