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

Error message 2

Status
Not open for further replies.

Ielamrani

MIS
Jul 7, 2005
183
US
Can anyone tell me why I get the following message:

Data type mismatch in cretiria expression.

The query open for about 10 seconds and then I get the above message. I can't copy the query or export it.


Here is the code behind it:

SELECT DISTINCT Mid([Street],1+InStrRev([Street],' ')) AS FalseStreet, *
FROM dbo_PROV_ADDINFO_HCVW
WHERE (((Mid([Street],1+InStrRev([Street],' '))) In (SELECT Abbrev FROM AddrAbbrev)));
 
First guess - there are occurences of Null in the Street field - see if the following alteration of the expression (both places) work.

[tt]iif(Isnull([street]);"";Mid([Street],1+InStrRev([Street],' ')))[/tt]

Roy-Vidar
 
RoyVidar, you did it. Thanks soooo much.

I made a small change: I replaced ;""; with ,"", Right before the Mid
It did not work with the semicolons but worked with the colon..

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top