continueous update of the time in access

blueanchor

Registered User.
Local time
Today, 21:41
Joined
Aug 4, 2005
Messages
10
How can i insert a time function that is continueously being updated to run as a clock
 
add a timer control, activate it and on the tick event do whatever for your clock. One tick is 1/1000 of a second
 
BCullenward said:
add a timer control, activate it and on the tick event do whatever for your clock. One tick is 1/1000 of a second
Great way to bog down the users CPU by wasting the computers resources with a timer running that fast. Doesn't the users computer have a real time clock sitting in the right corner of their screen? If you need a time stamp of some sort for a form or report then update [requery] the text box displaying the current date/time only when neccessary.
 
I agree with hudson. People often add the "fancy" look and feel of a database when they forget the purpose of one. A database is designed, to store data in an organized manner and retrieve data/perform operations on the fly. Access is notorious for its Ad-hoc queries that corporations can use on a small scale in their office settings.

In my opinion, a database has:
a brain (the cpu),
a heart (the memory),
a body (the storage unit/HD),
and a bone structure (the Operating System).

The key to keeping it finely tuned is to be able to beat as much data it can, while giving it full attention to what it's doing. In non-metaphorical terms.. give the database as much memory as you can and award it full processor attention to have improve retrieval speed.

Other design factors would limit your database health, so you should take into consideration the need and necessity of each additiona "add-on" you wish to incorporate. In other words: what is the cost benefit of having a constant clock on your form?

As a side note: If you were to include a clock, I would not use the form's timer event as that is a HUGE drain on Access's resource. I bet there is an ActiveX clock that you could implement that would call on a Windows API routine.
 
Hmmm…

The OnTimer event is not an interrupt in the strict sense of the definition of the word.

It is a polled event (very low priority) that will be executed when Access has nothing better to do.
It will not interrupt code or SQL processing without deliberate intervention.
(That is the reason that 'progress meters' don’t normally work in Access during 'heavy processing'.)
It will not interrupt the operating system if the operating system has something better to do, like send/receive Emails.
It will not interrupt Task manager/Performance even though it says 100% CPU usage.
(If Access was consuming 100% CPU usage then how did Task manager get displayed and updated?)

And as many exceptions you can think of.

The local machine should not be affected by even a 1-millisecond timer interval.
(It is too low in the 'food chain' and will be done when the local CPU has nothing better to do.)

There could be other issues like screen flicker or network loading but that is another thing.

Regards,
Chris.
 

Users who are viewing this thread

Back
Top Bottom