IIf

concerns

The IIf function checks the expression passed in and returns the True part or the False part.

 

Syntax

IIf(Expression, TruePart, FalsePart)

Return value

Type

Description

Result

Variant

Parameter

Use

Name

Type

Passing

Description

Required

Expression

Variant

ByVal

Expression of which to check

Required

TruePart

Variant

ByVal

Value to get result if the validated expression is TRUE

Required

FalsePart

Variant

ByVal

Value to get result if the validated expression is FALSE

 

This feature is particularly useful when using in expressions to control the state of controls: