Results 1 to 4 of 4

Thread: Text boxes' DataField

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2001
    Posts
    78

    Question

    Is there a simple way to change a text box's datafield?

    Aside from making it a string and changing the string every time you want to change it?

    Such as...
    Text2 is set to DataField "FIELD2", I need it to switch to "FIELD3" and so on and so on. Until I get to "FIELD128". Whats the easiest way to do that?

    Thanks.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Feb 2001
    Posts
    78
    Anyone know how to switch those? I've v\been tryin for a while with different combos of strings and other variables, but have yet to come up with something. Any help would be great.

  3. #3
    Hyperactive Member
    Join Date
    Feb 2001
    Location
    LoCal
    Posts
    280
    Does it have to be by field name or can you do it by index?

    Code:
    Dim rsData as New RecordSet
    
    '  load rsData stuff here
    
    
    '  assuming you have 128 fields in rsData
    
    For lngindex = 1 to 128
       
         txtTextBox.DataField = rsData(lngIndex)
    
         'do whatever you have to do here
    
    Next

    Just a shot in the dark since I haven't actually tried it.
    Achichincle

    VB6 (VSEE SP5, W2KPro)
    ASP
    HTML

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2001
    Posts
    78
    I'm pretty sure it has to be by field name, I'm gonna try throwin it into an array...

    I'll wish myself luck.

    Thanks alot tho.

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