Time how long it takes to complete a form

A

Access Joe

Hey everyone!

Does anyone know of a way to physically time how long it takes for someone
to complete a form? For example, as soon as they start entering text in the
first field, a timer (in the background - they don't have to see it) will
begin, tracking the amount of minutes it takes for them to get to the end of
the form and fill in the last field.

My assumption is that is can be done, but would require some coding. If so,
please let me know where to place that code. Thanks so much!

Joe
 
G

Graham Mandeno

Hi Joe

It depends on how accurate you want to be.

If you want to time to the nearest second, you can save the start time
(dtStart = Now) and then calculate the difference in seconds between that
and the finish time:
lSeconds = DateDiff("s", dtStart, Now)

If you want to measure with more precision (milliseconds) you can use the
Timer function with the same principle - save the start value and subtract
it from the finish value.

One caveat: the Timer function resets to 0 at midnight, so you might have to
allow for a special case that starts before and ends after midnight.
 
J

John W. Vinson

Hey everyone!

Does anyone know of a way to physically time how long it takes for someone
to complete a form? For example, as soon as they start entering text in the
first field, a timer (in the background - they don't have to see it) will
begin, tracking the amount of minutes it takes for them to get to the end of
the form and fill in the last field.

My assumption is that is can be done, but would require some coding. If so,
please let me know where to place that code. Thanks so much!

Joe

You could use an invisible unbound control, txtStarttime say, on the form, and
another (visible or invisible) control bound to the field in which you're
storing the time elapsed (let's call it txtElapsed and assume you want to
store the integer seconds, i.e. 390 would represent 6 1/2 minutes).

Put code in the Form's BeforeInsert event - which fires the instant a new
record is started:

Private Sub Form_BeforeInsert(Cancel as Integer)
Me.txtStarttime = Now
End Sub

Then in the form's BeforeUpdate event:

Private Sub Form_BeforeUpdate(Cancel as Integer)
<do any validation checking first>
<if the record passes validation then...>
Me.txtElapsed = DateDiff("s", Me.txtStartTime, Now)
End Sub
 

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