Nz Function

  • Thread starter Thread starter JimP
  • Start date Start date
J

JimP

I've used the Nz function in queries to set Null values to fixed values
e.g.Nz(Field1,0)

It appears the function will also accept a variable instead of a fixed
value. e.g.Nz(Field1, Field2)

This is not documented in MS-Access help - are there issues?
 
None that I am aware of.



--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
None that I am aware of.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.








- Show quoted text -

So, what would happen if Field2 was null? Would the function return a
null?

Chris M.
 
Nz(Field1,field2) will return null if both fields are null. I would be
cautious and test that in crosstab queries in the Tranform clause,as in that
case it M I G H T return a zero-length string.

Why don't you build a test case and see what happens and then report back to
the newsgroup?

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top