View Full Version : Help! Expressions in Queries


mandi
05-01-2002, 04:21 PM
Hi,
I'm a new user of access and i just can't work out how to do a particular expression.
Basically i want to work out a commision amount based on an employee having reached a sales target. I want to use an if expression but can't work out what to do next.
So far this is what i've done;
iif([EmpSales]-[EmpSalesTarget]>0)....
I only want to calculate a commision if the sales target has been reached as well as assign a value of zero if the target is not met.
Any help would be appreciated.
Thanks

Jack Cowley
05-01-2002, 04:51 PM
IIF([EmpSales]-[EmpSalesTarget]>0,Comm*Sales,0)

IIF(Calculation, True, False)

If EmpSales - EmpSalesTarget >0, Calc Commision Here (true part of IIF), 0 (false part of IIF)

mandi
05-02-2002, 05:28 AM
Thanks a lot!
Worked like a dream...