Page 7 of 10PREVNEXT

Queries IV: Use functions and calculated fields in your queries

Ways to find null values in your data


If you don't enter data in a field, Access treats it as null or undefined. Null values can be important. For example, in a database of student grades, a null can mean that a student hasn't turned in an assignment.

Nulls can also affect the results of your totals queries, calculations, and even your sort operations. For example, the Count and Average functions automatically ignore null values.

So what do you do about them? What if you need to find some or all of the nulls in a table, or exclude nulls from your query results? You can use another pair of operators, Is Null and Is Not Null.

Callout 1 In the query design grid, type either operator in the Criteria cell of the field you want to check. Use Is Null to include only records with null values in your results, and use Is Not Null to return all records that don't contain nulls.
Callout 2 You can also use Is Null in expressions. The one in the picture displays a blank cell whenever the Country field contains a null value; otherwise it displays the countries.

Keep going and give null values a try in the practice session.

Page 7 of 10PREVNEXT