Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find X in a Number String 1

Status
Not open for further replies.

jcmv007

Technical User
Nov 1, 2001
88
US
USING:
Windows XP SP1
Access 2002 SP1

What function or code can I use to find for example, 1 in the following string: 8,1,9,11,23 ?
 
InStr(1, String, "1")

will give you the location of the first occurance of the second arguement in the first string...in this case:

Instr(1, "8,1,9,11,23", "1")

would return 3

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top