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!

Get character from a string

Status
Not open for further replies.

don2241

IS-IT--Management
Jun 1, 2001
57
AU
Hi!

I'm trying to capture characters in a string to build words

Ex.
This is a string example:
Washer Tap Body Fiber 20mm Fulway

I want to get Washer to be able to put into an array(0) and then Tap to put in the same array(1) and Body at array(2) position and so on...

I'v been working on using the instr function to locate the spaces but after that i'm stuck because I don't know if there is a function to build further

Thanks for any help

M.
 
Thanks for that JohnYingling!

One question though:
What happens when I have a different string the next time around. The thing is I have a table with 86 000 rows with a description line each that I want to compare to in another field.

The string is always dynamic

Ex.

do until (rst.eof <> true)
-get each word in a string
-add it into an array

do while (rst2.eof <> true)
do until (end of the first array cells)
-get each word in a string
-add it into a second array
-compare first word in array position (0) to every word in the second array
if (there is a match)
i = i+1
rst2.movenext
else
rst2.movenext
end if
loop

loop

rst.movenext
loop

Thanks
M.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top