Private Sub Command6_Click()
Dim Ctl As Control
Dim intCount As Integer
For Each Ctl In Me.Controls
If Ctl.ControlType = acCheckBox Then
If Ctl = True Then
intCount = intCount + 1
End If
End If
Next
If intCount > 1 Then
MsgBox "你不能选择多于一个选项!"
ElseIf intCount = 0 Then
MsgBox "你不能不选择一个选项!"
ElseIf intCount = 1 Then
MsgBox "你选择正确!"
End If
End Sub