B
BigK9
I keep getting the following message when I try to run a sales report
This expression is typed incorrectly, or it is too complex to be evaluated.
For example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variables.
I have provided my SQL statement as follows.
SELECT DISTINCTROW [LastName] & ", " & [FirstName] AS [Employee Name],
Sum(CLng((nz([Labor Totals by Workorder].[Labor Total])+nz([Parts Totals by
Workorder].[Parts Total]))*[SalesTaxRate]*100)/100) AS [Sales Tax],
Sum([Labor Totals by Workorder].[Labor Total]) AS [Total Labor], Sum([Parts
Totals by Workorder].[Parts Total]) AS [Total Parts]
FROM ((Employees RIGHT JOIN Workorders ON Employees.EmployeeID =
Workorders.EmployeeID) LEFT JOIN [Labor Totals by Workorder] ON
Workorders.WorkorderID = [Labor Totals by Workorder].WorkorderID) LEFT JOIN
[Parts Totals by Workorder] ON Workorders.WorkorderID = [Parts Totals by
Workorder].WorkorderID
WHERE (((Workorders.DateFinished)>=[Forms]![Report Date Range]![Beginning
Date] And (Workorders.DateFinished)<=[Forms]![Report Date Range]![Ending
Date]))
GROUP BY [LastName] & ", " & [FirstName];
Please look this over and help me to fix it.
This expression is typed incorrectly, or it is too complex to be evaluated.
For example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variables.
I have provided my SQL statement as follows.
SELECT DISTINCTROW [LastName] & ", " & [FirstName] AS [Employee Name],
Sum(CLng((nz([Labor Totals by Workorder].[Labor Total])+nz([Parts Totals by
Workorder].[Parts Total]))*[SalesTaxRate]*100)/100) AS [Sales Tax],
Sum([Labor Totals by Workorder].[Labor Total]) AS [Total Labor], Sum([Parts
Totals by Workorder].[Parts Total]) AS [Total Parts]
FROM ((Employees RIGHT JOIN Workorders ON Employees.EmployeeID =
Workorders.EmployeeID) LEFT JOIN [Labor Totals by Workorder] ON
Workorders.WorkorderID = [Labor Totals by Workorder].WorkorderID) LEFT JOIN
[Parts Totals by Workorder] ON Workorders.WorkorderID = [Parts Totals by
Workorder].WorkorderID
WHERE (((Workorders.DateFinished)>=[Forms]![Report Date Range]![Beginning
Date] And (Workorders.DateFinished)<=[Forms]![Report Date Range]![Ending
Date]))
GROUP BY [LastName] & ", " & [FirstName];
Please look this over and help me to fix it.