Row filtered out; can't figure out why (1 Viewer)

liamrowan

Registered User.
Local time
Yesterday, 23:38
Joined
Jul 15, 2010
Messages
54
XP/Access 2010

I have a table with a column that has only blank cells or an "x". In the qry based on the table, the criteria for this column is <>"x". All of the rows that have "x" are filtered out as expected, but there is one lone row that has a blank cell in the column used for filtering that does not show up in the qry results! I can't even come up with a theory why, since clearly there is no "x" in the cell on which the query is filtering for this row.

When I remove the criteria completely, all the rows that have "x" in the cell show up in the return as expected, along with this single row that does not have an "x". Why would <>"x" filter out a row that does not have "x" in the filtered column, and allow it back in the return when the filter is removed!?

Thx for ideas, William
 

CJ_London

Super Moderator
Staff member
Local time
Today, 04:38
Joined
Feb 19, 2013
Messages
16,721
It probably has a null value so the query fails on ths row

try

nz(yourfield)<>"x"
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 23:38
Joined
Feb 19, 2002
Messages
43,683
When you compare anything to Null, the answer is Null. It is NEVER true even if logically it is:)
A <> X = true
"" <> X = true ' "" is a ZLS (Zero-Length-String)
X <> X = false
Null <> X = null 'to the human mind this is true but not to the mind of a computer
 

liamrowan

Registered User.
Local time
Yesterday, 23:38
Joined
Jul 15, 2010
Messages
54
Appreciate the responses. The null cells were the issue.

WM
 

Users who are viewing this thread

Top Bottom