Connecting Tech Pros Worldwide Forums | Help | Site Map

Data type mismatch in criteria expression

Newbie
 
Join Date: Aug 2009
Posts: 5
#1: Aug 31 '09
Hi All,

I have a table with Released, in quality and blocked stock. I want to rrun a query using MS access create query using wizard. Under criteria I put =1 for released, >0 for in quality and And>0 for blocked and it gives me the above error message.

The aim of this exercise is to extract stock with (1kg on released and kg>0 in quality) and also (1 kg released and kg>0 on blocked) on using one query

Expert
 
Join Date: Jul 2009
Location: KY
Posts: 253
#2: Aug 31 '09

re: Data type mismatch in criteria expression


Please post the actual query code, and if possible, please also post the data type of each of these fields, or at least an example of what is stored in each of these fields.

This sounds like your fields are Text but you are comparing as if they are numeric.

Thank You,
-AJ
Newbie
 
Join Date: Aug 2009
Posts: 5
#3: Aug 31 '09

re: Data type mismatch in criteria expression


I have emailed you the screenshots. My data type is numeric i.e. kilograms of stock, hence i use logical expressions to query.

Regards
Tumi
Expert
 
Join Date: Jul 2009
Location: KY
Posts: 253
#4: Aug 31 '09

re: Data type mismatch in criteria expression


I don't have access to email at this time, could you zip the files you emailed me and attach it to this thread. Look for the button "Manage Attachments" below to attach.

Thank You,
-AJ
Newbie
 
Join Date: Aug 2009
Posts: 5
#5: Aug 31 '09

re: Data type mismatch in criteria expression


I had just knocked off from work when u requested that i attach the file. I guess you will have a look at it at home on your email?

Regards
Expert
 
Join Date: Jul 2009
Location: KY
Posts: 253
#6: Sep 1 '09

re: Data type mismatch in criteria expression


I took a quick glance at your screenshot, the only thing that stood out to me is that you have an "and" inside one of the criteria, which is going to fail because you are comparing a text "and" to a number. Take that out and let me know what happens.

-AJ
Newbie
 
Join Date: Aug 2009
Posts: 5
#7: Sep 1 '09

re: Data type mismatch in criteria expression


I will run it and revert to you. Its a bit busy today at work.
Newbie
 
Join Date: Aug 2009
Posts: 5
#8: Sep 3 '09

re: Data type mismatch in criteria expression


i ran the query without an and, got the results although not as i would have liked to have them.

I now got an oracle driver installed to my pc and i will be able to query data directly from heterogeneous database. Any material in pdf format u have on SQL for begginers?

Regads
Reply