Help - Data type mismatch in criteria

A

ad

I get "Data type mismatch in criteria" error for the following field in a query

Field:
=========
Sales_: Left([Sales],1) & Mid([Sales],InStr(1,[Sales]," ")+1,1)

Criteria:
=========
<>"GW"


Where [Sales] is a text field. I don't know what is wrong. Can any one please help me. I am using MS OfficeXP.

GW
 
J

Jeff Boyce

Have you tried running the query without any criterion for this field? This
would give you a chance to inspect what's actually being generated by your
string manipulation.

Good luck

Jeff Boyce
<Access MVP>
 
D

Dale Fye

My guess is that you have one or more records where [Sales] is null?
Instr requires a string and will throw this error if it encounters a
null.


--
HTH

Dale Fye


I get "Data type mismatch in criteria" error for the following field
in a query

Field:
=========
Sales_: Left([Sales],1) & Mid([Sales],InStr(1,[Sales]," ")+1,1)

Criteria:
=========
<>"GW"


Where [Sales] is a text field. I don't know what is wrong. Can any one
please help me. I am using MS OfficeXP.

GW
 

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