
30/10/2017, 20:54
|
 | | | Fecha de Ingreso: febrero-2007 Ubicación: México
Mensajes: 823
Antigüedad: 18 años Puntos: 24 | |
Respuesta: recorrer textbox Una manera que se me ocurre (no está probado, es solo una idea) es usar un array de controles, llenarlo y luego recorrerlo para recuperar tus datos:
Llenar tus controles, tal vez convenga ponerlos como globales
Dim i As Integer
Dim label(4) As New Label
Dim textbox(4) As New TextBox
For i=0 To 3
textbox(i).ID = "txt" & tabla.Rows(i)("Campo").ToString()
label(i).ID = "lbl" & tabla.Rows(i)("Campo").ToString()
label(i).Text = tabla.Rows(i)("Campo").ToString()
Panelform.Controls.Add(label(i))
Panelform.Controls.Add(textbox(i))
Next
Para recuperar los datos
For i=0 To 3
objmov.Valor = TextBox(i).Text
Next |