I have a query that works fine until I put the following statement in the sql:
Sum(Iif(SBL =1,([Totalreg Labor]+[Totalot Labor]/2), ([Totalreg Labor]+[Totalot Labor])) AS [Total Labor],
The error I get is "Syntax error(missing operator) in query expression."
When clicking ok it highlights the AS
The above sql is in the select portion of the query and is to see if a checkbox is checked, if it is then it should total totalreg labor and totalot labor and divide the sum by 2, if it is not true then just add totalreg labor and totalot labor, regardless of true or false, put the sum in the calculated field total labor.
What am I missing? Any help will be appreciated.
Sum(Iif(SBL =1,([Totalreg Labor]+[Totalot Labor]/2), ([Totalreg Labor]+[Totalot Labor])) AS [Total Labor],
The error I get is "Syntax error(missing operator) in query expression."
When clicking ok it highlights the AS
The above sql is in the select portion of the query and is to see if a checkbox is checked, if it is then it should total totalreg labor and totalot labor and divide the sum by 2, if it is not true then just add totalreg labor and totalot labor, regardless of true or false, put the sum in the calculated field total labor.
What am I missing? Any help will be appreciated.