Consulting

Results 1 to 3 of 3

Thread: help with this IIF statement

  1. #1
    VBAX Newbie
    Joined
    Dec 2007
    Posts
    1
    Location

    help with this IIF statement

    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

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    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.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular n8Mills's Avatar
    Joined
    Sep 2006
    Location
    Washington State
    Posts
    54
    Location
    Your second IIF isn't evaluating any conditions, and neither is your third. I'd read up on IIFs before trying to nest them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •