Quote:
quote:Originally posted by BrianWren
The part of NZ() (above) returned when the first argument is [u]not</u> Null
Code:
[Forms]![fLAMPREditProd]![txtInt2ID]
will return a string, right?
|
That is correct.
Quote:
|
quote:So shouldnât the part returned if the first argument [u]is</u> Null be a string also ("Not Null")?
|
No, that is not correct. If you encase the words with the quotation marks you turn the condition of NOT NULL into a string of "Not Null". You're not looking for a string, you're looking for the condition of the the field having a value. Think of it this way.
5 is a byte, value 5
"5" is a one-character string, value to "5"
True is a boolean, value TRUE or -1.
"True" is a four-character string, value "True"
Null is a reserved Access variable/function denoting no value, value... nothing at all!
"Null" is a four-character string, value "Null"
Not Null is a combination of two reserved words. The Not negates the second part of the condition. Therefore Not Null means to have a value (you don't care what).
"Not Null" is an eight-character string, value "Not Null".
See what I mean? If you put the quotes, your query will actually look for the string "Not Null" in your field rather than search for any value that is not null.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division