Home page
 
 Home 
 ASP 
 PHP 
 SQL 
 HTML 
 JavaScript 
 Search 
 Contact 
 
Search
or browse popular tags
Access Functions
Subscription

Sign up for the free email newsletter for new tips, tutorials and more. Enter your email address below, and then click the button.

Privacy Policy

RSS Twitter

Access: IsNull Function

Print

In Access, the IsNull function returns a boolean value that indicates whether or not an expression contains no valid data (Null).

The syntax for the IsNull function is:

IsNull ( expression )

In Access, the expression argument can be any numeric or string expression. The IsNull function returns True (-1) if the expression contains the Null value; otherwise, it returns False (0). Null is not the same as a zero-length string, which is often referred to as a null string.

Important: Using the IsNull function is the only way from within Access to determine whether or not an expression contains a null value.

Example

IsNull(null)                returns TRUE
IsNull("WebCheatSheet")     returns FALSE
IsNull(2006)                returns FALSE

VBA Code

Dim MyResult as Boolean 
MyResult = IsNull("WebCheatSheet")

This example uses the IsNull function to determine if a variable contains a Null. Now the MyResult variable would contain FALSE as a value.

SQL query

You can also use the IsNull function in a query.

SELECT IsNull([Address]) AS Expr1
FROM AntiqueOwners


If you'd like to see how it works, enter SQL statement and press Execute
 




Tags:

Add To: Add to dzone dzone | Digg this digg | Add to del.icio.us del.icio.us | Stumble it stumbleupon

  • Comments





Copyright © 2005-2014             www.WebCheatSheet.com All Rights Reserved.