I'm trying to determine whether a control belongs to a subform (inside a tabbed page) which is inside my main form. Seems that if you set the following, none of the controls inside a subform get collected:
For each ctl in Screen.ActiveForm.Controls
For Each ctl In Screen.ActiveForm.Controls
If Screen.ActiveForm.ActiveControl.ControlType = acSubform Then... this line not working.....
Debug.Print "Active Control = " & Screen.ActiveForm.ActiveControl.Name
End If
If ctl.Tag = "Audit" Then
Debug.Print "Control Name = " & ctl.Name & vbNewLine & "Control Type = " & ctl.ControlType
End If