What's it doing?? Not Like

  • Thread starter Thread starter G Lykos
  • Start date Start date
G

G Lykos

Greetings! Have a simple append query, to which a filter was added to
exclude input records via Not Like where a field starts with "7B7". That
field in some records is empty. Applying the Not Like criterion causes
Access not only to block records satisfying the criterion but also to throw
out records with no entry. A screwy work-around seems to be to add a second
criterion of Is Not Null to the effect of (Not Like 7B7*) Or (Is Not Null).
Is there a cleaner way?

Why is Not Like throwing out records where that field has no entry??
Logically, they (also) satisfy the Not Like 7B7* screen.

Thanks,
George
 
Null is never equal or not equal to anything. If you think as Null being an
unknown value then the statement becomes
"Is this unknown value not equal to this known value" and the answer
becomes "I don't know. It could be."

Your solution is the best available, although you could use a calculated
field and test against that

Field: Nz(FieldX,"")
Criteria: Not Like "7B7*"
 
Back
Top