MS ACCESS: NZ FUNCTION

DESCRIPTION

The Microsoft Access Nz function lets you return a value when a variant is null.

SYNTAX

The syntax for the Microsoft Access Nz function is:
Nz ( variant, [ value_if_null ] )

PARAMETERS OR ARGUMENTS

variant is a variable that is a variant datatype.
value_if_null is optional. It is the value to use when the variant is a null value. If this parameter is omitted and the variant is a null value, the Nz function will return a zero or a zero-length string.

APPLIES TO

The Nz function can be used in the following versions of Microsoft Access:
  • Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000

EXAMPLE

Nz (varName, "n/a")
The example above would return the value ‘n/a’ if the variable varName contained a null value.
Nz (varName)