Help - Data type mismatch in criteria

  • Thread starter Thread starter ad
  • Start date Start date
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
 
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>
 
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
 
Back
Top