点击下载此附件
演 示:
源 码:
Private Sub Check1_AfterUpdate()
Dim ctl As Control
If Me.Check1 = -1 Then '若复选框选中
For Each ctl In Me.Controls
If ctl.ControlType = acCommandButton Then '判断控件是否为按钮
ctl.Enabled = False '控件可用
End If
Next
Else
For Each ctl In Me.Controls
If ctl.ControlType = acCommandButton Then
ctl.Enabled = True
End If
Next
End If
End Sub