The single text box approach:
dim intLen as integer, strChar as string*1
dim intCtr as integer, dblCharValues() as double
intLen=len(txtBox.text) 'Get length of Container Number (7?)
'Make sure you validate the value of the text box!
'Reserve memory to hold the char values
redim dblCharValues(1 to intLen)
for intCtr=1 to intLen
'Capture the current char
strChar=mid(txtBox.text,intCtr,1)
'Call a function of your design to assign
'the value to the current char
dblCharValues(intCtr)=AssignValue(strChar)
next intCtr
'Do what ever you need with your array of values.
--Another Steve.
"steve" <me@home.com> wrote in message news:<40***********************@news.optusnet.com. au>...
Hi all i am writing a program to validate shipping container numbers.
Basically it gets each letter and number, gives it a value, does a bit of
math and spits out an answer (kinda like basic cd key validation). I
currently have 7 text boxes (one for each character). Everything works but i
dont know how to do the following:
Have a single text box and have it be able to work out each character.
OR
Set it up so that when i press a key it will automatically move the the next
text box. At the moment i have to tab to each box.
I prefer to have seperate text boxes for this app but i would like to learn
both ways of doing it.
thanks
steve