microsoft access help database programing developer
Back to Access Experts About Access Experts Access Experts Websites Access Experts Team Access Experts Services Access Experts Case Studies Access Expert Tips Contact Access Experts OUR BLOG
 
 
How to query for nothing
by Juan Soto
02/15/2006

If you need to query for the lack of values, then use Null in your criteria

In Microsoft Access, there is a difference between querying for no value, (Null), and querying for empty strings, (exemplified as to double quotes with nothing between them: “”). Also keep in mind that a space, “ “, is not a null or empty string, but a blank character.

Query for the absence of a value

Use the NULL keyword in your criteria when you need to see all records were one of the fields has no data. If on the other hand you wish to see records were a particular field has to have any kind of data, use IS NOT NULL as your criteria.

Expecting nothing and got something?

Sometimes you may use Null as a criteria and notice a record missing that should be in your analysis. The mostly likely culprit will be a space, " ", in the field. Simply click in the field, delete the space and run your query again.


If you like this tip you will be delighted with our service! Call or write us today for a free quote regarding your computer needs.

Publish this article in your own corporate newsletter or publication! Contact us to obtain a free license.


Home | About Us Why PCExperts | Team | Services | Newsletter | Contact Us
Copyright © 2004