INF: Nz Function Returns Zero-Length String in QueryID: Q186310
|
Novice: Requires knowledge of the user interface on single-user computers.
In the versions of Microsoft Access listed at the beginning of this
article, if you use the Nz() function in a query expression on a Null value
in a number field, the Nz() function returns a zero-length string value and
not a zero as expected.
Microsoft Access Help for the Nz() function states that the second
argument, ValueIfNull, is optional and goes on to say:
If the value of the variant argument is Null, the Nz function returns
the number zero or a zero-length string, depending on whether the
context indicates the value should be a number or a string.
To return a string value of zero, use the optional second argument ValueIfNull to specify the use of "0" in place of the Null.
X:NZ([Field1])
For more information about the Nz() function, search for "Nz," and then "Nz Function" using the Microsoft Access Help Index.
Keywords : kbdocerr kbdta QryProb
Version : WINDOWS:7.0,97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: April 27, 1999