Search for value

F

fredg

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.
 
D

Denny

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", ":")
 
D

Denny

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top