I get the error "subqueries can not be used in the expression" Here is the entire query.
SELECT Workorders.WorkorderID, Workorders.[Date:], Workorders.[Customer:], Workorders.[Signal Locations:], Workorders.[School Flashers:], Workorders.[Flasher Locations:], Sum([workorders empdetails]![Emp 1 Hours:]*[Employees]![PayRatew/Benefits]) AS [Totalreg Labor], Workorders.[Time Arrived:], Workorders.[Time Completed:], CInt(CDbl(Nz([Time Arrived:])*24*60)) AS minin, CInt(CDbl(Nz([Time Completed:])*24*60)) AS minout, [minout]-[minin] AS totmin, IIf([minin]=0 Or [minout]=0,[totmin]=0,[totmin]) AS minutes, IIf([minutes]<0,[minutes]=0,[minutes]) AS allmin, ([allmin]/60) AS hours, Sum([workorders empdetails]![Emp 1 OT]*[Employees]![OvertimeRatew/Benefits]) AS [Totalot Labor],
Sum(IIf([Workorders].[BCBOE]=True,([Totalreg Labor]+[Totalot Labor])/2, [Totalreg Labor]+[Totalot Labor])) AS [Total Labor],
Workorders.[Work Activity]
FROM Employees INNER JOIN (Workorders RIGHT JOIN [workorders empdetails] ON Workorders.WorkorderID = [workorders empdetails].WorkorderID) ON Employees.EmployeeID = [workorders empdetails].[Employee - 1:]
GROUP BY Workorders.WorkorderID, Workorders.[Date:], Workorders.[Customer:], Workorders.[Signal Locations:], Workorders.[School Flashers:], Workorders.[Flasher Locations:], Workorders.[Time Arrived:], Workorders.[Time Completed:], Workorders.[Work Activity];
Thanks