[RESOLVED] Using text1.text as text(Variable).text
I have not used VB for some time now and I am VERY rusty.
I am using VB6
What I want to do is use the numbers at the end of the textboxes to be declared a Variable
I have a quote sheet I am designing, it has 12 text boxes across and 15 down
the ones across are names like this:
txtType1, txtWidth1, txtDrop1, txtCode1, txtFabric1, txtColour1 ....bla bla bla. to txtPrice1
The other 14 rows are the same but with a 2,3,4,5,6.....to 15 at the end
All my data is stored in a local .dat file
I need to be able to search the database.dat and place the results in the right textbox using variables that increase by 1 when the data is collected for the first row
In my old BBC Basic Days I would use A%=A%+1 in a repeat loop to place data in various variables, but I can't with VB6 textboxes without a load of coding for each line
I have searched the forum, but nothing fits the bill
any help or ideas would be Great
Thanks
Re: Using text1.text as text(Variable).text
I am posting the solution here in case anyone else needs to know how it was solved
I=1
Me.Controls("Textbox" & i).text = co
(co being a variable from the .dat database)
Thanks Again, the rust is falling off slow but sure