Calculate driver hours

  • Thread starter Thread starter Jackie Mellenthin via AccessMonster.com
  • Start date Start date
J

Jackie Mellenthin via AccessMonster.com

I have a database that logs truck driver hours. I cannot get it to total
only the most recent 6 days and 7 days and display that total for me in
both the form and reports. I am sure this will have to be done with VB, I
am just not VB savvy (yet). Can anyone help?
 
Depending on your data structure, I would think you would simply modify your
query to only pull the last 6 or 7 days. You don't tell us which or why.
Then, pull all the data to your forms and reports. Add a field to total the
figures.

If you log start and stop times, then you would need to add a field to your
query to subtract the two figures to get the elapsed time.

There are lots of previous posts out there that will tell you more about how
to perform math on times.


Without more details on your data, we can't really give you more details on
the solution.


Rick B
 
I understand, unfortunately it's not quite that simple (I don't think). The
driver hours are in continuous form. The driver hours are calculated daily.
Ex:
Column A [Hrs Today]
These hours are entered [Hrs Today]

Column B [Hrs6days]
[Hrs today](today's date plus 5 days prior) is used to calculate the hours
on duty the last 6 days.

Column C [Avail]
[Hrs6days] is used to calculate the hours available tomorrow(60-[Hrs6days])

Column D [Hrs7days]
[Hrs today](today's date plus 6 days prior) is used to calculate the hours
on duty the last 7 days.

This is in continuous form.

Does that help?

Thanks a bunch!

Jackie
 
Back
Top