Tripple iif statement works only partially

MushroomKing

Registered User.
Local time
Today, 14:27
Joined
Jun 7, 2018
Messages
100
Hey guys! Again, stuff just weirds out on me and i'm at a loss for something very simple...:banghead::D

So I have a query with this statement:

problem: IIf([difference]>=0;"Short";IIf([difference]<=0;"Over";IIf([difference]=0;"Ok")))


So my results are as follows:

The "Short" seems to be used for everything, unless it's "Over"

The "Over" statement seems to work just fine. Correct results!

The "Ok" statement doesn't work at all.



Why does it partially work???? I am looking at this, trying all kinds of things, nothing works. Could you guys please put me out of my misery? Thanks!!!!!!! :o
 
Because you have >= (greater or equal to) first.

Use it this way:
Code:
IIf([Difference]>0,"Short",IIf([Difference]<0,"Over",IIf([Difference]=0,"Ok")))
 
Last edited:
Dammit...I should find another job...

Thank you very much! :)
 
or just

IIf([Difference]>0,"Short",IIf([Difference]<0,"Over","Ok"))
 

Users who are viewing this thread

Back
Top Bottom