Results 1 to 3 of 3
  1. #1
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    IIf with AND (2002 SP-2)

    In an unbound txtbx in the footer of a continuous form I have:

    =Sum(IIf([txtEquipmentType] Like "Flat*",[BrokerNetCalc],0))

    which returns the sum of [BrokerNetCalc] for each order where the [txtEquipmentType] begins with "Flat..."
    I have recently discovered the need to exclude some of the orders based on [txtOrderStatus] is not "HOLD", but I'm running into syntax errors (not that that's anything new). I need to return the sum of [BrokerNetCalc] where [txtEquipmentType] begins with "Flat..." AND [txtOrderStatus]<>"HOLD". Any and all help greatly appreciated.
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: IIf with AND (2002 SP-2)

    Try

    =Sum(IIf([txtEquipmentType] Like "Flat*" AND [txtOrderStatus] <> "HOLD",[BrokerNetCalc],0))

  3. #3
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: IIf with AND (2002 SP-2)

    <img src=/S/bouncenburn.gif border=0 alt=bouncenburn width=31 height=31> . . .those closing brackets are going to be the end of me one day!
    Thanks Hans!
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

Posting Permissions

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