PDA

View Full Version : help with this IIF statement



btechpc
12-21-2007, 04:20 PM
I have the following IIF statement:

DisplayVal("N", IIf(Rpjpik.fqty_iss > IIf(Rpjpik.flextend, Rpjpik.ftotqty * Rpjpik.fquantity, Rpjpik.ftotqty), 0, IIf(Rpjpik.flextend, Rpjpik.ftotqty * Rpjpik.fquantity, Rpjpik.ftotqty) - Rpjpik.fqty_iss))

Now from what I can tell, if the value is greater than Rpjpik.fqty_iss, it will return that number, else it will display a Zero (0). What I would like to do is change this statement to if the item value is equal to Zero (0) do not display it at all. I know this is probably very simple, but I have been fighting it all day and my brain is fried.... maybe another set of eyes can crack it!

Thanks

Brad :banghead:

Bob Phillips
12-27-2007, 04:08 AM
That code doesn't even compile for me, so probably best you post a working version.

Some data might help as we have no idea what is in all of those fields.

n8Mills
01-06-2008, 09:37 PM
Your second IIF isn't evaluating any conditions, and neither is your third. I'd read up on IIFs before trying to nest them.