How to fix Error when trying to write an if statement?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carla siordia
    New Member
    • Jan 2011
    • 3

    How to fix Error when trying to write an if statement?

    I am receiving an error


    Numeric Numeric Rating: IIf([monthlyExtracto rIPH]![KXT Rating]="Exceeds" OR [KXT Rating] ="Me: IIf([monthlyExtracto rIPH]![KXT Rating]="Exceeds"," 3")
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    I'm not sure what you're trying to do but here's how your IIf breaks out.
    Code:
    IIf(
    [monthlyExtractorIPH]![KXT Rating]="Exceeds"
    OR
    [KXT Rating]="Me: IIf([monthlyExtractorIPH]![KXT Rating]="
    Exceeds"
    ,
    "3"
    )
    Here's how an IIf should be formatted.
    Code:
    IIf(
    expression
    ,
    trueValue
    ,
    falseValue
    )

    Comment

    • carla siordia
      New Member
      • Jan 2011
      • 3

      #3
      I think the issue is I am not looking for a false value. I am looking for a true for 3 different senarios.

      so IIf(
      [monthlyExtracto rIPH]![KXT Rating]="Exceeds" then "3"

      IIf(
      [monthlyExtracto rIPH]![KXT Rating]="Meets" then "2"

      IIf(
      [monthlyExtracto rIPH]![KXT Rating]="DNM" then "1"

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Your expression doesn't match your description at all. I see nothing in there about Meets or DNM. I see two Exceeds where the second Exceed is incorrectly syntaxed.

        You also need to specify a false value, it's a required parameter of the IIf function.

        Comment

        • carla siordia
          New Member
          • Jan 2011
          • 3

          #5
          Ok. I will try again. Thank You

          Comment

          Working...