P
paul.schrum
I am storing listbox values in my own collection. Each item in the
collection has text delimited by semicolons as follows:
Item(1) might be "217;133"
Item (2) might be "833;199"
I am trying to write a function that will give me one integer by using
the other integer as an index. The number of entries will always be
small, so the time-overhead is not a concern.
I want to write this function:
Public Function getByColumnNumber(text as String, colNum as Integer) as
Integer
In which the input string (text) would be of the above form
("num1;num2"). It is okay if I restrict it to working only with
2-column strings.
So getByColumNumber("833;199", 2) would return the integer 199. I can
do this if I can figure out how to parse a string. In C we have
strtok. Is there an equivelent to that in VC for Access. If not, is
there a good way to write the function I want to write?
- Paul
collection has text delimited by semicolons as follows:
Item(1) might be "217;133"
Item (2) might be "833;199"
I am trying to write a function that will give me one integer by using
the other integer as an index. The number of entries will always be
small, so the time-overhead is not a concern.
I want to write this function:
Public Function getByColumnNumber(text as String, colNum as Integer) as
Integer
In which the input string (text) would be of the above form
("num1;num2"). It is okay if I restrict it to working only with
2-column strings.
So getByColumNumber("833;199", 2) would return the integer 199. I can
do this if I can figure out how to parse a string. In C we have
strtok. Is there an equivelent to that in VC for Access. If not, is
there a good way to write the function I want to write?
- Paul