Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NOT query not working

Status
Not open for further replies.

withoutaclue

Programmer
Aug 28, 2002
31
GB
I have a Query that calls a fuction I a modules to separate a field, (ie Name = Tome Jones) = Firstname:Tom, Second=Jones) I then run a count on this to see how many Jones, smiths, Shaw that I have in that table, SIMPLE ENOUTH,

HOWEVER I don’t want some data to be displayed or counted, ie <> “JONES”, but when I run this In a query I keep getting DATA MISMATCH IN CRITERIA,
Even when I change the function in the module to be a function in a query it doesn’t work, I have even tried, running one the first query, and then the second from that.

It Not letting me use NOT

Can someone please help? Can it be done in a module, if so how, ,
 
Without seeing your SQL I can't be exactly sure what's going on but have you tried using the word Not instead of <>? Depending on which version of access you're using it could be throwing an error since <> is usually used for numberical expressions and would explain your error of Type Mismatch. I hope this helps.
 
I tried all sorts of ways of doing the not values, it just doesnt seem to like it,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top