Search for value

  • Thread starter Thread starter Georges
  • Start date Start date
Hello

How can I search for the value (:) in my string

Thanks

It depends upon where and why?

Like "*:*"
will return all records that include the ":" anywhere in the field.

or...

InStr(1,[FieldName],":")

If there is a ":" it will return it's first position within the
string, or 0 if it there is none.
 
Lookup InStr function

If numb > 0 then : is not in the string, otherwise it
gives you the position it is in the string. In my example
you get 6, as the ':' is in the 6th position in the string.

Dim intPosition As Integer

intPosition = InStr(1, "Searc:hString", ":")
 
I think I put 'numb' in my first reply to your question.
That was the original variable I used to test. Should read
as intPosition.

thanks
 
Back
Top