Hi all,
I have a query that returns expenses from a table and summarizes them by direct costs and indirect costs.
I use an unbound form to specify the criteria, which in this case is the date range for which the expense should fall within.
My problem is some date ranges work fine and other times, I receive this error: "This Expression is typed incorrectly, or it is too complex...". For example a date range of 7/1/15 to 9/30/15 works, but 4/1/15 to 6/30/15 does not. Can anyone help? SQL below. Thanks in advance - Ryan.
SELECT qryexpense.expenseaccount, Sum(IIf([expensecode]<>"9740",[expenseamount],0)) AS directcosts, Sum(IIf([expensecode]="9740",[expamount],0)) AS indirectcosts, Sum(qryexpense.expenseamount) AS totalcosts
FROM qryexpense
WHERE ((qryexpense.expensedate)>=[Forms]![frmcosts]![start] And (qryexpense.expensedate)<=[Forms]![frmcosts]![end]))
GROUP BY qryexpense.expenseaccount;