加载中...

Databases

  1. Home
  2. Computing & Technology
  3. Databases

Microsoft Access Function Library: IIf()

By Mike Chapple, About.com

Function: IIf()

Purpose: The IIf() function allows the conditional return of different values depending upon whether an expression evaluates to true or false.

Usage: IIf(expression, true_value, false_value)

Expression is the expression you wish to evaluate.
True_value is the value that should be returned if expression is true.
False_value is the value that should be returned if expression is false.

Returns: true_value or false_value.

Examples and Special Cases
IIf(Weight > 200, "Overweight", "Normal")
Returns "Overweight" for any weight value greater than 200 pounds and "Normal" otherwise.

Explore Databases

More from About.com

New Year, New You

Take action today to accomplish your biggest goals with these motivating ideas.

Best Moves in a Bad Economy

Stay on top in this tough economy with our smart, easy-to-follow financial tips.

Databases

  1. Home
  2. Computing & Technology
  3. Databases
  4. Microsoft Access
  5. Access Function Library
  6. Microsoft Access Function Library: IIf()

©2009 About.com, a part of The New York Times Company.

All rights reserved.