I
idtjes3
Hello
I am calculating overtime hrs on a report but running into a bit of a
snag. On my report i have a text box ( PayPeriodHrs ) which is populated from
a Pay Period Selection form( You select the start, end date, and input the
total hrs for the period, then press a button to launch the report). All the
hours with dates in between the start and end date are placed in the report
and the total pay period hours are working perfectly. I have a text box,
txtSumOfHrsTotal, which "Sums" all the hours between the dates for a
particular employee. Another text box, txtRegularTimeHrs, which calculates
only regular tme worked by using: =[txtSumOfHrsTotal]-[txtOvertimeHrsTotal] .
Lastly, I have a box, txtOvertimeHrsTotal, to calculate over time hours by
the equation;
=IIf([PayPeriodHrs]<[txtSumOfHrsTotal],[txtSumOfHrsTotal]-[PayPeriodHrs],0)
The equation above is only working for a few employees though. For
instance, I entered 6 for PayPeriodHrs and one worker worked 8 hrs(1 day, 1
record) so txtSumOfHrsTotal=8, txtRegularTimeHrs=6, and
txtOvertimeHrsTotal=2. But i also have an employee who worked 16 hrs ( 2
days, 2 records) which is giving me txtSumOfHrsTotal=16, txtRegularTimeHrs=16
and txtOvertimeHrsTotal=0. This is also happening to an employee who has
worked 24hrs ( split between 4 seperate records).
Why is this? Does it have to do with the fact the 16 hrs is from 2
records? Since the equation is basing off the contents of the SumOfHrsTotal
shouldn't that not even matter? Is my equation to blame? Thanks.
I am calculating overtime hrs on a report but running into a bit of a
snag. On my report i have a text box ( PayPeriodHrs ) which is populated from
a Pay Period Selection form( You select the start, end date, and input the
total hrs for the period, then press a button to launch the report). All the
hours with dates in between the start and end date are placed in the report
and the total pay period hours are working perfectly. I have a text box,
txtSumOfHrsTotal, which "Sums" all the hours between the dates for a
particular employee. Another text box, txtRegularTimeHrs, which calculates
only regular tme worked by using: =[txtSumOfHrsTotal]-[txtOvertimeHrsTotal] .
Lastly, I have a box, txtOvertimeHrsTotal, to calculate over time hours by
the equation;
=IIf([PayPeriodHrs]<[txtSumOfHrsTotal],[txtSumOfHrsTotal]-[PayPeriodHrs],0)
The equation above is only working for a few employees though. For
instance, I entered 6 for PayPeriodHrs and one worker worked 8 hrs(1 day, 1
record) so txtSumOfHrsTotal=8, txtRegularTimeHrs=6, and
txtOvertimeHrsTotal=2. But i also have an employee who worked 16 hrs ( 2
days, 2 records) which is giving me txtSumOfHrsTotal=16, txtRegularTimeHrs=16
and txtOvertimeHrsTotal=0. This is also happening to an employee who has
worked 24hrs ( split between 4 seperate records).
Why is this? Does it have to do with the fact the 16 hrs is from 2
records? Since the equation is basing off the contents of the SumOfHrsTotal
shouldn't that not even matter? Is my equation to blame? Thanks.