G
Guest
Some time ago, someone in this forum suggested the following code to hide
controls which are blank:
Dim ctl As Control
For Each ctl In Me.GroupHeader0.Controls
Select Case Left(ctl.Name, 3)
Case "txt", "cbo"
If IsNull(ctl.Value) Then
ctl.Visible = False
Else
ctl.Visible = True
End If
Case Else
'Ignore: wrong type of control
End Select
Next ctl
However, I'm getting an error which says:
"Run-time error: '438': Object doesn't support this property or method.
Am I missing something here? Thanks.
ck
controls which are blank:
Dim ctl As Control
For Each ctl In Me.GroupHeader0.Controls
Select Case Left(ctl.Name, 3)
Case "txt", "cbo"
If IsNull(ctl.Value) Then
ctl.Visible = False
Else
ctl.Visible = True
End If
Case Else
'Ignore: wrong type of control
End Select
Next ctl
However, I'm getting an error which says:
"Run-time error: '438': Object doesn't support this property or method.
Am I missing something here? Thanks.
ck