I was wondering if it is possible to reference a textbox name property with a variable. I have a form that has 16 textboxes (txtHome-1 - txtHome-16) I was hoping to be able to loop through them and fill each textbox with different Data without having to specifically set all txtBoxes individually.
Something Like:
Private Sub cmdPractice_Click()
Dim i As Integer
Dim Nme As String
For i = 1 To 16
Nme = "txtHome-" & i
Me.Controls(Nme) = HELLO
Next i
End Sub
Is this Possible to do with access forms?
Hascons
Something Like:
Private Sub cmdPractice_Click()
Dim i As Integer
Dim Nme As String
For i = 1 To 16
Nme = "txtHome-" & i
Me.Controls(Nme) = HELLO
Next i
End Sub
Is this Possible to do with access forms?
Hascons