|
Lagbolt, you are correct. I did provide incorrect information on the use of nz. Here is the correct information on its use. Thank you for keeping me honest.
You can use the Nz function to return zero, a zero-length string (" "), or another specified value when a Variant is Null. For example, you can use this function to convert a Null value to another value and prevent it from propagating through an expression.
Syntax
Nz(variant[, valueifnull])
The Nz function has the following arguments.
Argument Description
variant A variable of data type Variant.
valueifnull Optional (unless used in a query). A Variant that supplies a value to be returned if the variant argument is Null. This argument enables you to return a value other than zero or a zero-length string.
Note If you use the Nz function in an expression in a query without using the valueifnull argument, the results will be a zero-length string in the fields that contain null values.
In the next example, the optional argument supplied to the Nz function provides the string to be returned if varFreight is Null.
varResult = Nz(varFreight, "No Freight Charge")
__________________
Godofhell
www.kavalpewter.com
|