IsNull

This function determines whether an expression contains no valid data (Null).

Syntax

IsNull(expression)

Parameters

expression
Any expression.

Return Values

Returns True if expression is Null, that is, if it contains no valid data; otherwise, it returns False.

Remarks

If expression consists of more than one variable, Null in any variable in a Boolean expression causes True to be returned for the entire expression.

The Null value indicates that the variable contains no valid data. Null is not the same as Empty, which indicates that a variable has not yet been initialized. It is also not the same as a zero-length string (""), which is sometimes referred to as a null string.

Use IsNull to determine whether an expression contains a Null value. Expressions that you might expect to evaluate to True under some circumstances, such as If Var = Null and If Var <> Null, are always False. This is because any expression containing a Null is itself Null, and therefore, False.