Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Apr 2003
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IIF Statement (2000)

    Hopefully this is an easy question and I'm just overlooking it. I want to use the following IIF statement in one of my reports:

    =IIf([CODE]="6020",[SumOfAMOUNT],[SumOfWORKSTUDY_EARNED])

    I want the criteria to read "[CODE]="6020" Or "6030"" but Access isn't liking that. It's ignoring the IIF statement. Can anyone tell me how to get the OR function to work in the criteria?

    Thanks,
    Kindra

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

    Re: IIF Statement (2000)

    Use

    [CODE]="6020" Or [CODE]="6030"

    There must be complete conditions on either side of "Or".

  3. #3
    Star Lounger
    Join Date
    Sep 2002
    Location
    Hastings, Sussex, England
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: IIF Statement (2000)

    Kinaida,

    you need to say "[Code ]= "6020" Or [Code] = "6030".

    Regards,

    JulesG

  4. #4
    2 Star Lounger
    Join Date
    Apr 2003
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IIF Statement (2000)

    Thanks!!! I knew it was something relatively simple [img]/forums/images/smilies/smile.gif[/img] Must have some brain blockage this morning!

Posting Permissions

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