Nz()

esseven

New member
Local time
Today, 21:50
Joined
Mar 16, 2010
Messages
4
Hi,
I am looking through the Asset Tracking Database in Access 2007 and try to find out how it works. The first question that comes to my mind is about the Nz function. Anybody who knows what it does? How do I find it in VBA? It does not show up in the code modules, nor the class modules..

=Nz([Contact Name];"Untitled")
 
It means NULL TO ZERO (although its name is a legacy term). It takes something and if it is null it assigns the value you want to it (within the datatype).

So, in your example, if Contact Name is null then it assigns the word "Untitled" as the value.
 
Ok, great, thanks. But is it possible to see the actual function, or is it hidden in Access somewhere?
 
It is a built in function. But if you go to the VBA window type Nz and then hit F1 you should get the help topic for it.
 
it's a very useful function... try adding two numbers when one is blank... result is nothing when 99 times out 100 you probably what it to treat that blank/null as zero... NZ will save you!
 
the code itself, like all intrinsic functions will be machine code in a dll somewhere - its not vba you can inspect
 

Users who are viewing this thread

Back
Top Bottom