calculated fields and IIF function

E

eric

I am trying to add a calculated field "BillTotal" which is the sum of
"OrderAmount" and "DeliveryCharge" fields, I also need to add a IFF function
to add "2" to the "BillTotal" field if the "City" field contains "Naples".
I can get the first part, the Sum, but can't figure out the IFF function.
 
D

Dylan Moran

I would tie a conditional macro to an event on your form.

Look for help on conditional macros and use the setvalue action.

Hope this helps
 
M

Marshall Barton

eric said:
I am trying to add a calculated field "BillTotal" which is the sum of
"OrderAmount" and "DeliveryCharge" fields, I also need to add a IFF function
to add "2" to the "BillTotal" field if the "City" field contains "Naples".
I can get the first part, the Sum, but can't figure out the IFF function.

Try this:

BillTotal:
OrderAmount + DeliveryCharge + IIf(City = "Naples", 2, 0)
 
Top