Dealing with NULL values in a recordset

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ineedahelp
    New Member
    • Sep 2006
    • 98

    Dealing with NULL values in a recordset

    Can anyone tell me if this is correct code? I have to deal with an occasional NULL value in MarketPrice. I am cycling through a recordset created by an SQL

    If IsNull(rst!Mark etPrice) Then....
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by ineedahelp
    Can anyone tell me if this is correct code? I have to deal with an occasional NULL value in MarketPrice. I am cycling through a recordset created by an SQL

    If IsNull(rst!Mark etPrice) Then....
    'The syntax looks correct from my end.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32662

      #3
      That's all good.
      However, in some circumstances (not all) it's better to use the function Nz() when dealing with fields which may contain Null.

      Comment

      • ineedahelp
        New Member
        • Sep 2006
        • 98

        #4
        Thanks for the help!

        Comment

        Working...