InStr, substr, Mid ???

J

J. Muenchbourg

I have a field name "tracks" of string data type that has multiple names
in it (for example: calder delaware$ aqueduct ), and I want to check to
see if this certain field has "delaware$" in it. InStr or the Mid
functions return the numerical order of where that string starts inside
the string, but it doesnt tell me if "delaware$" exists in "tracks".

????
Muench
 
A

Alan

If (Instr(1, tracks, "delaware$", vbTextCompare) <> 0) Then

' delaware$ is in the string

End If

Just watch out for other return values from Instr - check MSDN.

Cheers,

Alan
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top