Haahz
02-24-2009, 03:08 AM
Hi I've just created a query to find the wages of certain staff, hours worked * hourly wage, it works. How would I go about calculating overtime, for the company their overtime is calculated at their normal wage + 10% of the normal wage. I've got a tick box, stating if a certain employee has worked overtime or not. How could I calculate the overtime, when the overtime box in clicked at the calculation stated above?
Cheers.
Haahz.
Haahz
02-24-2009, 07:36 AM
Anyone? I really need a hand, and its urgent.
DCrake
02-25-2009, 03:02 AM
If your maths are any good then why not try writing down the equasion. Then transpose that into the access calculation.
In this instance I will do it for you
Ok we need to know four things
a) hourly rate
b) Normal hours worked
c) over time rate
d) overtime hours
GrossPay = (Normal hours worked * hourly rate) + (Ovetime hours * overtime rate)
So if
a = 10
b = 40
c = 1.1 (hourly rate plus 10%)
d = 5
Gross pay = (40*10)+(5*(10*1.1)) = 455
Basic pay = (40*10) = 400
Overtime = (5 * 11) = 55
Gross pay = 455
Where 11 = hourly rate plus overtime rate (10 + 10%)
So to do this in Access you would have four fields /variables a,b,c & d
and replicate the above formula
Remember if you can write it down you can program it.
David
Haahz
02-25-2009, 10:21 AM
The hourly rate, normal hours worked, and overtime hours will all be different. Would there be a way to have this query so when data is entered it calculates the overtime worked if overtime has been worked.
Sorry math isn't my strongest point.
DCrake
02-26-2009, 12:36 AM
If you studied my earlier post I stated that 4 items of info was needed, and I listed them. These would be fields in your table. Then in a query you would employ the calculation
GrossPay : ([Normal hours worked] * [hourly rate]) + IIF([Overtime Hours] > 0,([Ovetime hours] * [overtime rate]),0)
What puzzles me is why ask someone with limited maths skills to write a payroll database?