Query to calculate Conditional field

aymanmb

Registered User.
Local time
Tomorrow, 00:31
Joined
Jan 28, 2007
Messages
96
Dear all,

I have a query that is based on orders table and contains "Qty", 'UnitCost', and "ctualUnitCost", in addition to yes/no control to indicate if "SalesTax" is applicable.

I want an expression in the query to calculate total cost in one of 2 conditions:
if no sales tax then TotalCost = Qty*UnitCost
if sales tax is applicable then Total cost = Qty*UnitCost*1.1

how can I write this expression

thanks
 
TotalCost: Iif([SalesTax], Qty*UnitCost*1.1, Qty*UnitCost)
 
Thanks a lot
 

Users who are viewing this thread

Back
Top Bottom