Hi all,
I am trying to clear all the textboxes on my form. The problem that I am having is that the textboxes are inside of GroupBoxes and the following code only sees the GroupBoxes.
Do I need to have a seperate variable to access the controls within the GroupBoxes and therefore have a nested loop or is there just something that I am missing?
Any help, as always, is greatly appreciated.
Brian
I am trying to clear all the textboxes on my form. The problem that I am having is that the textboxes are inside of GroupBoxes and the following code only sees the GroupBoxes.
Code:
Dim ctl As Control
For Each ctl In Controls
If TypeOf ctl Is TextBox Then
ctl.Text = ""
End If
[green]'test line to see what controls I am hitting[/green]
MessageBox.Show(ctl.Name)
Next
Do I need to have a seperate variable to access the controls within the GroupBoxes and therefore have a nested loop or is there just something that I am missing?
Any help, as always, is greatly appreciated.
Brian