NiallWestland1974
Programmer
Hi,
I'm trying to dynamically capture the captions of the forms contained in a form and, in addition, set the onchange property of these controls dynamically through VBA.
Does anyone have any ideas on how to solve either (or even one!) of these problems??
The (faulty!) code is:
For i = 0 To Me.Count - 1
If TypeOf Me(i) Is TextBox Then
If i = 0 Then
strTextBoxName = Me(i).Caption
Else
strTextBoxContent = strTextBoxContent & "," & Me(i).Caption
End If
End If
Next i
Thanks
I'm trying to dynamically capture the captions of the forms contained in a form and, in addition, set the onchange property of these controls dynamically through VBA.
Does anyone have any ideas on how to solve either (or even one!) of these problems??
The (faulty!) code is:
For i = 0 To Me.Count - 1
If TypeOf Me(i) Is TextBox Then
If i = 0 Then
strTextBoxName = Me(i).Caption
Else
strTextBoxContent = strTextBoxContent & "," & Me(i).Caption
End If
End If
Next i
Thanks