Hi,
There are 50+ textboxes and comboboxes on my form and I created a label to store the tag of each textbox or combobox as it is focused.
This is portion of what I had currently.
Private Sub cmbCGWPBCl1t_GotFocus()
Forms!Main!lblMessage.Caption = Me!cmbCGWPBCl1t.Tag
End Sub
Private Sub txtSUHal_GotFocus()
Forms!Main!lblMessage.Caption = Me!txtSUHal.Tag
End Sub
Would anyone show me how I can put them all into a loop using the for loop?
For Each ctl In Me.Controls
--- codes ---
Next ctl
Thanks in advance for the help!