Not Like

aftershokk

Registered User.
Local time
Today, 21:37
Joined
Sep 5, 2001
Messages
259
I have a text field where I am selecting records that are not like "*aftershokk*"
and it is not filtering these out. I am using wild cards because there is other info in this filed.

thanks,
 
Usually this is because of a malformed entry in the query grid.

You should have the field in the query grid top row and
not like "*aftershokk*"
in the criteria row.

That should do it. However, you didn't say whether it is part of a very long memo field. Sometimes memo fields over 65 kbytes give trouble for some things.
 
Doc man is correct as always in that you should have it in your query criteria section.

if your looking for records with "aftershokk" shock any where in them then you would use
like "*"&"aftershokk"&"*" as the criteria.
As you looking for records without aftershokk in i assume it would just be the same but with not in it ie. Not Like "*"&"Aftershokk"&"*".
am i correct in thinking the "*" is not part of the record but intended as a wildcard. if so this should only return those records without "Aftershokk" anywhere in them.

hope this helps

ian
 
It is in my criteria section and it works for like "*company*", but does not work when you use not like.
 
I cannot reproduce this problem under AC97. I was able to build a query that uses a "not like" clause in the criteria row for a text field. In my test case, I filtered for one of our project names just to verify I could do it.

Field name row contained: [Project]
Criteria row contained: not like "*nsips*"

Worked fine! I got everything except the stuff for the NSIPS project out here. No problems. But just to be sure, I tried it on a memo field. Worked there, too!

Let me make a suggestion.

Take your query and remove the NOT. See if it returns ANY records at all. If the LIKE query returns 0 records, then you would expect the NOT LIKE to return ALL of your records, which is what it sounds like is happening to you. Just a quick sanity check that is easy to try.
 

Users who are viewing this thread

Back
Top Bottom