Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2005
    Posts
    43

    Unanswered: iif statement and three parts to it

    hello, all:

    (hopefully, this is a) quick question. the iif statement has three parts to it:

    Code:
    iif (expression, truePart, falsePart)
    and all three parts are required. now, if a part is missing, how will Access run that code?

    for example, if the
    Code:
    falsePart
    is missing, then what will Access do? nothing? or will the code just run, but maybe not get the results you really want?
    Mos

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    it will give an error message

    try it
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jun 2005
    Posts
    43
    thank you for your quick comment! i noticed that Access runs the query and returns records, but, i also suspect that nothing is returning the last iif. (sorry, i should back up and note that my question pertains to a query with a nested iff -- has 9 iif statements, where the false expression is an iif, all the way to the last iif statement, which doesn't have a false expression.) i suspect that there are no records that are returning the last iif as false.

    so, thank you very much for your response!
    Mos

Posting Permissions

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