Some help with Nz() specifics/specifications? (1 Viewer)

MS$DesignersRCretins

Registered User.
Local time
Yesterday, 22:47
Joined
Jun 6, 2012
Messages
41
I'm trying to interpret http://office.microsoft.com/en-us/access-help/nz-function-HA001228890.aspx . I know I could use trial and error to get my own reliable answers about MS matters; 99% of the time that's what I do anyway because there are never, ever, ever enough examples. This time I'm going to try and insist on getting a usable answer from Microsoft's web help page (famous last words, many of you know). It seems so badly contradictory that I feel that I must be mentally misfiring. Can someone follow and delouse my logic, or is it simply that this help page author was out sick the first day of Computer School, the day they covered "logic?"

From the webpage above:

- The 2nd argument is "Optional (unless used in a query)."
So far, can't tell if that means required or prohibited in a query. Moving on,

- "Note If you use the Nz function in an expression in a query without using the valueifnull argument"
So, okay, it must be optional when used in a query.

Dude, is it optional "unless" a query, or optional "when" a query?

But holy mushrooms, it gets better.

- "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"
So that means if you go Nz(Field1) a null input produces a zero-length string (in a query). So far so good. Yet going further
"(always returns a zero-length string when used in a query expression)"
What was the meaning of the first of these two statements, if the second one says null always returns a ZLS in a query?

- Omitting the parentheses for easier reading, presumably meaning for non-queries: "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." Shouldn't that be, "When the optional second argument is omitted" in addition to "If the value of the variant argument is Null" ?

- "When used in a query expression, the NZ function should always include the valueifnull argument,"
So it simply IS required in a query? So it's optional "unless" a query?

By the way, the rest of that webpage goes into surprisingly good detail (for Microsoft). I'm just confused by the first part. Can anyone make sense of it?
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 04:47
Joined
Jul 9, 2003
Messages
16,282
The website you point to shows some examples, is there one that covers the problem you are trying to solve? If not; state you problem and someone will probably be able to advise.
 

MS$DesignersRCretins

Registered User.
Local time
Yesterday, 22:47
Joined
Jun 6, 2012
Messages
41
The website you point to shows some examples, is there one that covers the problem you are trying to solve? If not; state you problem and someone will probably be able to advise.
No sweat. I'll figure it out on my own. Thanks for the helpful advice.
 
Last edited:

Users who are viewing this thread

Top Bottom