TigerNoire
MIS
I've built a timesheet/payroll database and I have one part left to complete in it.
What I have (a sample):
ProjID RegHours OTHours RHours
D04Beer 3.5 0 3.5
M04Rats 4 0 4
Pfront 6.5 0 6
Pbox 4 0 4
Pbox 7 0 6.5
Pcon 12 0 11.5*
*Should be 11, not 11.5 which is my problem
The idea: where a ProjID equals Pbox, Pcon, or Pfront, deduct a half an hour for more than 6 hours worked and a full hour if more than 10 hours are worked. (RHours are the result of the deduction and OTHours never exceed 6.)
What I've tried in a query field:
RHours: IIf([RegHours]>6 And ([ProjID]="Pbox" Or [ProjID]="Pcon" Or [ProjID]="Pfront" Or ([RegHours]>10 And ([ProjID]="Pbox" Or [ProjID]="Pcon" Or [ProjID]="Pfront"),([RegHours]-0.5),[RegHours])
This obviously only subtracts a half an hour if 6 hours or 10 hours has been reached.
Is it possible/what would I have to do to get this to work the way I need it to?
Thank you in advance!!
Val
What I have (a sample):
ProjID RegHours OTHours RHours
D04Beer 3.5 0 3.5
M04Rats 4 0 4
Pfront 6.5 0 6
Pbox 4 0 4
Pbox 7 0 6.5
Pcon 12 0 11.5*
*Should be 11, not 11.5 which is my problem
The idea: where a ProjID equals Pbox, Pcon, or Pfront, deduct a half an hour for more than 6 hours worked and a full hour if more than 10 hours are worked. (RHours are the result of the deduction and OTHours never exceed 6.)
What I've tried in a query field:
RHours: IIf([RegHours]>6 And ([ProjID]="Pbox" Or [ProjID]="Pcon" Or [ProjID]="Pfront" Or ([RegHours]>10 And ([ProjID]="Pbox" Or [ProjID]="Pcon" Or [ProjID]="Pfront"),([RegHours]-0.5),[RegHours])
This obviously only subtracts a half an hour if 6 hours or 10 hours has been reached.
Is it possible/what would I have to do to get this to work the way I need it to?
Thank you in advance!!
Val