filter by form erroneously filters 3/4 of all data

G

Guest

I have a table with ~1200 records and a form for entering data directly into
the table. 258 records have "kateb" in a field called Notes, but the Notes
field is blank in the majority of the remaining records. Using
filter-by-form, I entered Not Like "*kateb*" in the Notes field, (rest of
form blank) to try to filter out the "kateb"s , but when I ran the filter, I
ended up with only 217 records remaining. I've looked it over, but I'm
completely baffled. Anyone have any idea what's going on?
 
J

Jeff Boyce

What do you get if you use the same criteria in a query?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
K

Keith Wilby

hbear said:
I have a table with ~1200 records and a form for entering data directly
into
the table. 258 records have "kateb" in a field called Notes, but the
Notes
field is blank in the majority of the remaining records. Using
filter-by-form, I entered Not Like "*kateb*" in the Notes field, (rest of
form blank) to try to filter out the "kateb"s , but when I ran the filter,
I
ended up with only 217 records remaining. I've looked it over, but I'm
completely baffled. Anyone have any idea what's going on?

Try

Not Like "kateb" Or Is Null

Keith.
www.keithwilby.com
 
J

Jeff Boyce

The OP may wish to surround the name with "*"s if the name is contained
within the field...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Thanks to both of you for the help. The query Not Like "*kateb*" produced
the same results as the filter-by-form. Adding the Or Is Null solved the
problem and pulled up the rest of the records. I would have thought, though,
that Not Like "*kateb*" would have pulled everything that didn't contain
"kateb". Could either of you explain why it didn't?

Thanks again!
 
M

missinglinq via AccessMonster.com

Not Like "*kateb*" is comparing kateb to the contents of the field. If the
field is empty (Null) there's nothing to compare it to.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
K

Keith Wilby

hbear said:
Thanks to both of you for the help. The query Not Like "*kateb*" produced
the same results as the filter-by-form. Adding the Or Is Null solved the
problem and pulled up the rest of the records. I would have thought,
though,
that Not Like "*kateb*" would have pulled everything that didn't contain
"kateb". Could either of you explain why it didn't?

Because Null means "don't know", not empty.

Keith.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top