Is it possible to use single charcater wildcards in "InStr"?
In this case I wanted to search for a "/" preceeded and followed by 2
numerical characters but it didn't work.
May I assume it can't be done or did I just use the wrong syntax?
This is what I used. I was able to search for just a "/" but when I added
the #'s it was a no go.
InStr([Remark],"##/##")
George Nicholson - 23 Apr 2008 23:03 GMT
Instr() doesn't support wildcards. Check out VBA's Like operator
bolResult = [Remark] Like "*##/##*"

Signature
HTH,
George
> Is it possible to use single charcater wildcards in "InStr"?
> In this case I wanted to search for a "/" preceeded and followed by 2
[quoted text clipped - 4 lines]
> the #'s it was a no go.
> InStr([Remark],"##/##")
Marshall Barton - 23 Apr 2008 23:27 GMT
>Is it possible to use single charcater wildcards in "InStr"?
>In this case I wanted to search for a "/" preceeded and followed by 2
[quoted text clipped - 4 lines]
>the #'s it was a no go.
>InStr([Remark],"##/##")
No wildcards with InStr, but easy enough to add it to your
code:
pos = InStr(pos+1,Remark,"/")
If pos > 0 Then
If Mid(Remark,pos-1,3) Like "##/##" Then
. . .

Signature
Marsh
MVP [MS Access]