I'm having a very hard time calculating time on an access form. I have the following fields:
Shift1Start
Shift1End
Shift2Start
Shift2End
Shift3Start
Shift3End
Shift4Start
Shift4End
Lunch
TotalHours
The times entered above are on textboxes using medium time format (HH:MM AM or HH:MM PM). They do not cross over to the next day, they are all within one work day.
My goal is to get the "TotalHours " field to display a total time of the shifts, minus the "Lunch" field. TotalTime needs to be displayed in HH:MM AM/PM format.
I have tried:
Just to test before proceeding to attempt including the rest of the shifts, but I get the TotalHours field to display the time in decimal value. I have tried all kinds of variations but cannot nail the correct sintax/combination. I'm placing the code in the Control Source of the TotalHours field...
If anyone can please give me a hand would this I would really appreciate it.
In advance, Thank You!
Shift1Start
Shift1End
Shift2Start
Shift2End
Shift3Start
Shift3End
Shift4Start
Shift4End
Lunch
TotalHours
The times entered above are on textboxes using medium time format (HH:MM AM or HH:MM PM). They do not cross over to the next day, they are all within one work day.
My goal is to get the "TotalHours " field to display a total time of the shifts, minus the "Lunch" field. TotalTime needs to be displayed in HH:MM AM/PM format.
I have tried:
Code:
=([Shift1End]-[Shift1Start])*24
If anyone can please give me a hand would this I would really appreciate it.
In advance, Thank You!
Comment