Time Calculations

  • Thread starter jserrone via AccessMonster.com
  • Start date
J

jserrone via AccessMonster.com

Hello Everyone,
I wanted to get your opinion on a database I'm working on. I have a subform
that displays a record, when the form opens I'm capturing the current time as
my Start Time and when the user exits from the form I'm capturing the current
time as my Ending Time. I then use the time difference for statistical data.
This works fine but I wanted to bring it a step forward.
How Can I design the database so that if the user goes in the Record again
the time spend will be added to the initial time. So for example, Bob
accesses Record A he opens the form at 9:00 A.M. and closes it at 9:02 A.M.
he then goes back in record A to do some more keying at 9:05 and exits out of
the record at 9:07. Therefore he was in Record A for a total of 4 minutes.

I appreciate any help on this.

Thanks
 
D

Dennis

Well, since only the actual duration will go into the database column, it
should be a simple matter to add to the existing value upon subsequent edits
of that record. What I do is use a decimal for each 6 seconds of time. For
example, if a person was in a record for 3 minutes 45 seconds, the value
would be 3.75 (.75 being 3/4 of a minute). Simple enough methinks.
 
J

jserrone via AccessMonster.com

Do you happen to have a sample database I can take a look at to see how you
add the time with subsequent entries? I still can't visualize how to do it.

Thanks
 
J

John W. Vinson

Hello Everyone,
I wanted to get your opinion on a database I'm working on. I have a subform
that displays a record, when the form opens I'm capturing the current time as
my Start Time and when the user exits from the form I'm capturing the current
time as my Ending Time. I then use the time difference for statistical data.
This works fine but I wanted to bring it a step forward.
How Can I design the database so that if the user goes in the Record again
the time spend will be added to the initial time. So for example, Bob
accesses Record A he opens the form at 9:00 A.M. and closes it at 9:02 A.M.
he then goes back in record A to do some more keying at 9:05 and exits out of
the record at 9:07. Therefore he was in Record A for a total of 4 minutes.

I appreciate any help on this.

Thanks

If you still want to track each episode of editing, you may want to add a new
record for each (with its own start and end times), and then run a Totals
query to sum the DateDiff() calculated durations. There would be no need to
store the (running?) sum.
 

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