keschuster
asked on
Instr Type Mismatch
I'm getting a type mismatch when I add the textual comparison switch to the following
InStr(rsCol("Client Name"), (vArr(j)), 1)
The values are:ClientName:Autauga County Treasurer
SearchTerm:ALABAMA
or
try this
InStr(rsCol("[Client Name]"), vArr(j))
try this
InStr(rsCol("[Client Name]"), vArr(j))
The syntax InStr(rsCol("Client Name"), (vArr(j)), 1) looks correct but what are you doing with it, you need to provide the full line of code includinmg the value of J and the value of vArr(j)
If you Debug.Print InStr(rsCol("Client Name"), (vArr(j)), 1) do you get the error?
Cheers, Andrew
If you Debug.Print InStr(rsCol("Client Name"), (vArr(j)), 1) do you get the error?
Cheers, Andrew
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry... I always include the start in my syntax, but double-checking the Help file - it is optional, defaulting to 1.
yes you are correct miriam,
if the Compare is use, you have to specify the start argument
Take three (and sorry for all the posts)
From VBA Help:
"The start argument is required if compare is specified."
So it sounds like you DO need the start parameter if you are specifying Text Compare.
From VBA Help:
"The start argument is required if compare is specified."
So it sounds like you DO need the start parameter if you are specifying Text Compare.
Thx, Rey... very slow connection today :)
Hi Miriam, new one on me, shows how ofter I use anything other than the default comparison, that will be never then.
Cheers, Andrew
Cheers, Andrew
Andrew,
<shows how ofter I use anything other than the default comparison>
Lol! I never use anything else either :-)
I don't know how/why I picked up the habit of using the Start parameter. I always assumed it was required.
<shows how ofter I use anything other than the default comparison>
Lol! I never use anything else either :-)
I don't know how/why I picked up the habit of using the Start parameter. I always assumed it was required.
try this
InStr(rsCol("Client Name"), vArr(j))