result come out then invalid procedure call

  • I have select query in the MS ACCESS. First it come out the result. then it have invalid procedure call. the query have all the error show up. I do not know whether it is too complicate for them to evaluation the query. Thanks.

    SELECT Left([tblGovnData]![BUSNAME],InStr([tblGovnData]![BUSNAME],",")-1) AS Expr1, Trim(Mid([tblGovnData]![BUSNAME],InStr([tblGovnData]![BUSNAME],",")+1)) AS Expr2, tblGovnData.BUSNAME

    FROM tblGovnData

    WHERE (((InStr([tblGovnData]![BUSNAME],"Inc"))=0) AND ((InStr([tblGovnData]![BUSNAME]," Ltd"))=0) AND ((InStr([tblGovnData]![BUSNAME],"LLC"))=0) AND ((InStr([tblGovnData]![BUSNAME],"S.A."))=0) AND ((InStr([tblGovnData]![BUSNAME],","))<>0) AND ((InStr(Len([tblGovnData]![BUSNAME])-1,[tblGovnData]![BUSNAME],"."))=0));

     

  • first guess would be one or more of the rows in the BUSNAME column has a null in it.  second guess would be that you are not finding some of the strings you are searching for in the InStr calls.  your Expr1 has the possibility of generating a bad value if the comma is not found in the BUSNAME field.  That last condition in your where clause also has the possibility of generating an invalid value for InStr when the BUSNAME is null or empty.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply