Multiply negatives in IIf function

A

Alec Green

Hi, hope you can help, this is doing my head in!

I am using an IIf statement in a query in my orders database.
All appears to work fine when using positive figures, but not when I try
multiple with a negative figure.

For example

ChangedQty = -2
DiscountedValue = £135
ChangedDisc= £125

Using the first part of the IIf function.

IIf
([ChangedQty]<0,([DiscountedValue]-[ChangedDisc])*[ChangedQty],--false-part--)

I would have expected (£135-£125 = 10) * -2 which should be -£20,
but it doesn't it returns something like £40, I am missing some logical part
here???

Regards

Alec Green
 
Top