timer (showing seconds) on forms

J

jillc

I have inherited a slow database. I am going through all the suggestions
available in this community and elsewhere (splitting database etc), and need
to be able to show the users that these changes will speed up the system. Is
there a way to add a timer to a form so that the waiting-time can be measured.
 
C

Carl Rapson

jillc said:
I have inherited a slow database. I am going through all the suggestions
available in this community and elsewhere (splitting database etc), and
need
to be able to show the users that these changes will speed up the system.
Is
there a way to add a timer to a form so that the waiting-time can be
measured.

Each form has an On Timer event and a Timer Interval property that you can
use. Setting the Timer Interval property to something greater than zero
causes the On Timer event to "fire" at those intervals. The Timer Interval
is in milliseconds, so setting it to a value of 1000 would cause the On
Timer event to fire every second. In that event, you could increment a
counter in a textbox on the form.

Carl Rapson
 
M

Marshall Barton

jillc said:
I have inherited a slow database. I am going through all the suggestions
available in this community and elsewhere (splitting database etc), and need
to be able to show the users that these changes will speed up the system. Is
there a way to add a timer to a form so that the waiting-time can be measured.


Add a text box to display the elapsed time.

Set a form module level variable (named dtStart) in the
event code that starts an activity (such as Open).
dtStart = Now

Then when the activity finishes (e.g. Load) set the value of
the text box:
Me.textbox = DateDiff("s", dtStart, Now)
 
J

jillc

Thanks Marsh, does exactly as required
--



Marshall Barton said:
Add a text box to display the elapsed time.

Set a form module level variable (named dtStart) in the
event code that starts an activity (such as Open).
dtStart = Now

Then when the activity finishes (e.g. Load) set the value of
the text box:
Me.textbox = DateDiff("s", dtStart, Now)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top