G
Guest
This is our SQL statement
SELECT Tbl_Personnel.Work_Order_Number, Tbl_Personnel.Last, Tbl_Personnel.[Pay Rate], Tbl_Personnel.[OT Hours], Tbl_Personnel.[Regular Hours], Tbl_Personnel.[Holiday Hours], Tbl_Personnel.Date, IIf(Tbl_Personnel![Pay Rate]>100,Tbl_Personnel![Pay Rate]*24/2080,Tbl_Personnel![Pay Rate]) AS True_Pay_Rate, ([True_Pay_Rate]*[Regular Hours]) AS Reg_Labor, ([True_Pay_Rate]*[OT Hours])*1.5 AS OT_Labor, ([True_Pay_Rate]*2)*[Holiday Hours] AS Holiday_Labor, [Reg_Labor]+[OT_Labor]+[Holiday_Labor] AS Total_Labor, ([Regular Hours]+[OT Hours]+[Holiday Hours]) AS Total_Hours, ([Total_Labor]*0.177) AS Fringes, [Total_Hours]*2.8 AS Insurance, [Total_Labor]*[tbl - Workers Comp Codes]!Rate AS Work_Comp, [Total_Labor]+[Fringes]+[Insurance]+[Work_Comp] AS Total_Cos
FROM Tbl_Personnel INNER JOIN [tbl - Workers Comp Codes] ON Tbl_Personnel.WorkersCompCodw = [tbl - Workers Comp Codes].Cod
WHERE (((Tbl_Personnel.Work_Order_Number) Like [Enter Work Order Number]))
It works through Holiday_Labor. None of the other calculations are working. Most are based on Total_Labor and Total_Hours which are mathematical additions. Why do these addition statements not work
[Reg_Labor]+[OT_Labor]+[Holiday_Labor] AS Total_Labor, ([Regular Hours]+[OT Hours]+[Holiday Hours]) AS Total_Hours
Any assistance will be more than appreciated.
SELECT Tbl_Personnel.Work_Order_Number, Tbl_Personnel.Last, Tbl_Personnel.[Pay Rate], Tbl_Personnel.[OT Hours], Tbl_Personnel.[Regular Hours], Tbl_Personnel.[Holiday Hours], Tbl_Personnel.Date, IIf(Tbl_Personnel![Pay Rate]>100,Tbl_Personnel![Pay Rate]*24/2080,Tbl_Personnel![Pay Rate]) AS True_Pay_Rate, ([True_Pay_Rate]*[Regular Hours]) AS Reg_Labor, ([True_Pay_Rate]*[OT Hours])*1.5 AS OT_Labor, ([True_Pay_Rate]*2)*[Holiday Hours] AS Holiday_Labor, [Reg_Labor]+[OT_Labor]+[Holiday_Labor] AS Total_Labor, ([Regular Hours]+[OT Hours]+[Holiday Hours]) AS Total_Hours, ([Total_Labor]*0.177) AS Fringes, [Total_Hours]*2.8 AS Insurance, [Total_Labor]*[tbl - Workers Comp Codes]!Rate AS Work_Comp, [Total_Labor]+[Fringes]+[Insurance]+[Work_Comp] AS Total_Cos
FROM Tbl_Personnel INNER JOIN [tbl - Workers Comp Codes] ON Tbl_Personnel.WorkersCompCodw = [tbl - Workers Comp Codes].Cod
WHERE (((Tbl_Personnel.Work_Order_Number) Like [Enter Work Order Number]))
It works through Holiday_Labor. None of the other calculations are working. Most are based on Total_Labor and Total_Hours which are mathematical additions. Why do these addition statements not work
[Reg_Labor]+[OT_Labor]+[Holiday_Labor] AS Total_Labor, ([Regular Hours]+[OT Hours]+[Holiday Hours]) AS Total_Hours
Any assistance will be more than appreciated.