Dib
Although I have never worked in an Access ADP I believe you need to use TSQL
syntax (as Sql Server is the database engine), and as you have discovered
there is no IIF() in TSQL.
You probably want to replace the IIF() constructs with TSQL CASE function.
Sql Server BOL has a good explanation and lots of examples. For your
specific example it might translate like this:
SELECT This, That,
CASE Type
WHEN 1 THEN Cost*UnitSell
ELSE 0
END AS AndTheOther
FROM WhateverTable
WHERE SomeCondition
ORDER BY This, That, AndTheOther
CASE is far more flexible (and structured) than the IIF() function
especially when one has many WHEN conditions.
Ron W