Not displaying blanks in Query with Not Like Criteria

rajeevwgs

New member
Local time
Today, 10:58
Joined
Jun 14, 2012
Messages
9
Dear All,
I was trying to filter a word using Not Like "word" in my query cirteria, some data is blank also, From this record i want to retrieve the result. But when i use Not Like Criteria, filter is working but blanks columns are also filtered.
I want to display all records (including blanks) except what i shown in the criteria.
 
A null value is NEVER equal to anything not even a null value, i.e. Null = null will not work.

Only thing that can identify null values is functions that are designed to use them.
2 ways to go about this

1)
Add "Or is null" to your not like like.

2)
Use the NZ function on your column to force a value
NZ(YourColumn, "")
 
Thanks namliam,

I tried your 1st option and it works......
 

Users who are viewing this thread

Back
Top Bottom