IIF statement

R

RJ

I am trying to create the following "if statement" in MS access
through Expression builder.

=IF(UOM1="KG",Cost*Qty,IF(UOM2="KG",Cost*weight,Cost*quantity))

Even after spending a lot of time, I still can not figure out the
correct statement.

Please help, as this is very important for my job

Rashid
 
R

RonaldoOneNil

You need a double i on the If to make it an iif
=IIF(UOM1="KG",Cost*Qty,IIF(UOM2="KG",Cost*weight,Cost*quantity))
 
J

John Spencer

Also you refer to QTY in one part of the expression and Quantity in
another part of the expression. Are these two different fields or did
you have a problem while typing the expression.


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top