J
Jon
Greeting,
I have the following module that it groups controls in form :
**********************
Public Sub HideIt(frm As Form)
On Error Resume Next
Dim ctl As Control
For Each ctl In frm.Controls
With ctl
If ctl.Tag = "GroupA" Then
ctl.Visible = False
End If
End With
Next ctl
Set ctl = Nothing
Set frm = Nothing
End Sub
********************
I used it in the form with the following condition:
**********************
If Me.Check17 = True Then
HideIt
End If
**********************
But the following error occurs:
Compile errors: Argument not optional
How to fix it please??
I have the following module that it groups controls in form :
**********************
Public Sub HideIt(frm As Form)
On Error Resume Next
Dim ctl As Control
For Each ctl In frm.Controls
With ctl
If ctl.Tag = "GroupA" Then
ctl.Visible = False
End If
End With
Next ctl
Set ctl = Nothing
Set frm = Nothing
End Sub
********************
I used it in the form with the following condition:
**********************
If Me.Check17 = True Then
HideIt
End If
**********************
But the following error occurs:
Compile errors: Argument not optional
How to fix it please??