You're welcome.
>
>Thanks Sergey. You'll notice I DO in the lower SUM( IIF( BETWEEN( ET.date,... clauses. I'd forgotten this, and I lifted the IIF()s from a WHERE clause elsewhere and didn't consider that. :-)
>
>Terry
>
>>You cannot use BETWEEN operator inside IIF(). You have to use BETWEEN() function.
--sb--