Null & Nz function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • loisk
    New Member
    • Sep 2007
    • 97

    Null & Nz function

    I am still not clear about the differences between Null & Nz.
    Please excuse my idiot question, but can anybody give an explanation?
    Thanks!
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    null is a value that means that the field that has the value null has never had a value assigned to it.

    nz is a function that enables you to return a default value for a field that has a null value


    so if fld=null
    nz(fld,"Hello") =Hello

    if fld="Welcome"
    nz(fld,"Hello)= Welcome

    But Im sure you have seen desriptions like that before.
    Maybe it would be better if you described your understanding and what you were having trouble with?

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      Although we speak of "null value," in point of fact, Null actually means without any value.

      Linq ;0)>

      Comment

      • loisk
        New Member
        • Sep 2007
        • 97

        #4
        Originally posted by missinglinq
        Although we speak of "null value," in point of fact, Null actually means without any value.

        Linq ;0)>
        Hi Delerna and Missinglinq,

        I have a variable, data typed as variant in my sub. If this field is either untouched or blank (after deleted), if statement will be running when the event is recognized. The behavior was different between 'Isnull(myField )' Nz(myField) and I didn't understand why. Thanks!

        Comment

        Working...