Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

NZ - Check whether a value is Null

Total Hit ( 1692)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 



Click here to copy the following block
' Check if a value is Null. If not it returns the value,
' otherwise it returns the ValIfNull argument, or zero/null string
' if the second argument is omitted
'
' This function is patterned after the Access function with the same name.


Public Function NZ(CheckVar As Variant, Optional ValIfNull As Variant) As _
  Variant

  If IsNull(CheckVar) Then
    If IsMissing(ValIfNull) Then
      ' this translates to "" for strings, and 0 for numbers
      NZ = Empty
    Else
      NZ = ValIfNull
    End If
  Else
    NZ = CheckVar
  End If
End Function


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.