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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NOT queries not working

Status
Not open for further replies.

withoutaclue

Programmer
Aug 28, 2002
31
0
0
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, ,

 
I have had similar problems, and found that Access doesn't like passing Nulls to functions that require a string. You may need to either filter out Null fields in your query (so you never pass a Null value to the function), or deal with them in the function (If not IsNull(YourStringVariable) then...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top