Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2013
    Posts
    1

    Question Unanswered: Microsoft access criteria help please

    I am new to microsoft access and I am trying to put a criteria on my query. But I got an error message saying"The expression you entered contains invalid syntax. You may have entered an operand without an operator" I don't know what needs to be fix. Please help me out. Thank You.
    If the stock is higher

    If there are 7 or more in stock then display High. If there are between 4 and 6 in stock then display Medium. For those with fewer than 4 in stock display Low.

    IIf([Stock]>6,"High",IIf([Stock]between4and6,"Medium",IIf([Stock]<4,"Low")))

  2. #2
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    IIf([Stock]>6,"High",IIf([Stock]<4,"Low","Medium"))

    ??

    AFAIK you can't use BETWEEN in an IIF() function.

    but you coud use

    IIF(([Stock] >= 4 and [Stock] <= 6,"Medium","Not Medium")



    MTB

  3. #3
    Join Date
    Jan 2012
    Posts
    23
    IIF([Stock]>6,"High",IIF([Stock]<4,"Low","Medium"))

Tags for this Thread

Posting Permissions

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