Question : IIF expression in Access 2002 Query

I am trying to put together an IIF statement on a query and having trouble.

Here's my expression in English:
****************
If the field [project type] in the query equals [MR] or [PT] then the result for the Retainage field should = "0".  If the [project type] is [CR] or [NB] then the retainage field should calculate ([subtotal]*.10)
****************

According to what I read it should look something like this:

Retainage:
iff([project type] = [mr] or [pt], "0", [subtotal]*.10)
 
but I can't seem to make it work.


With the invoices I am making, some jobs require a reatainge and some do not (see above), but I can't figure out how to write the expression so Access likes it.  :-)

Answer : IIF expression in Access 2002 Query

Iif([projecttype]=[mr] or [projecttype]=[pt],0,[subtotal]*.10)
Random Solutions  
 
programming4us programming4us