Y
Yair Sageev
Greetings again,
I want to enable/disable controls on a contiuous subform detail section
based on whether a checkbox is clicked.
I wrote the following code for the click event of the checkbox:
Private Sub COCB_Click()
Dim cCtrl As CheckBox
Dim cCtrl2 As Control
Dim cCtrl3 As Control
Set cCtrl = Me.COCB
Set cCtrl2 = Me.COExecStatus
Set cCtrl3 = Me.COVisNum
If cCtrl.Value = False Then
cCtrl2.Enabled = False
cCtrl3.Enabled = False
Else
cCtrl2.Enabled = True
cCtrl3.Enabled = True
End If
End Sub
The problem is, it enables/disables EVERY control on EVERY detail section.
What am I doing wrong?
Thanks.
I want to enable/disable controls on a contiuous subform detail section
based on whether a checkbox is clicked.
I wrote the following code for the click event of the checkbox:
Private Sub COCB_Click()
Dim cCtrl As CheckBox
Dim cCtrl2 As Control
Dim cCtrl3 As Control
Set cCtrl = Me.COCB
Set cCtrl2 = Me.COExecStatus
Set cCtrl3 = Me.COVisNum
If cCtrl.Value = False Then
cCtrl2.Enabled = False
cCtrl3.Enabled = False
Else
cCtrl2.Enabled = True
cCtrl3.Enabled = True
End If
End Sub
The problem is, it enables/disables EVERY control on EVERY detail section.
What am I doing wrong?
Thanks.