Blanks removed by criteria?

M

Murray

Hello

I have a table that contains three fields (Name, Code1, Code2) that
when combined together make up a composite name. The Name field is
always non-blank, but Code1 and Code2 may or may not be blank.

A simple query to extract these three fields of course works fine, but
when I add criteria to the Code2 field of 'Not "Shallow"' to exclude
those specific entries, it also removes all those where Code2 is blank.

Can anyone please explain to me why this might be the case?

Thanks in advance

Murray
 
A

Allen Browne

If there is no value in the field, it is Null.

To exclude "Shallow", but still include the nulls, use this for your
criteria:
Is Null Or <> "Shallow"

More info in this article:
The Query Lost My Records! (Nulls)
at:
http://allenbrowne.com/casu-02.html
 
Top