Results 1 to 2 of 2

Thread: [RESOLVED] Using text1.text as text(Variable).text

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2012
    Location
    Bath UK
    Posts
    7

    Resolved [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

  2. #2

    Thread Starter
    New Member
    Join Date
    May 2012
    Location
    Bath UK
    Posts
    7

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width