Enable check box

D

davewater

I have 2 Yes/No boxes, (A&B) in a form. If box A is selected as "yes" how do
i prevent a "yes" entry in box B?. They don't have to be Yes/No, they can be
check boxes but the same criteria applies.
 
K

Ken Snell [MVP]

Sounds as if the user should be allowed to check just one or the other,
right? So what you should do is use the checkboxes as part of an option
group, which then will do what you want for you. There is a wizard in the
form's design mode that will help you set this up. You can also do it
manually but it's easier to do with the wizard.
 
G

Guest

hi,
so something like this:
Private Sub checkboxA_Click()
If Me.checkboxA = True Then
Me.checkboxB = False
End If
End Sub
Private Sub checkboxB_Click()
If Me.checkboxB = True Then
Me.checkboxA = False
End If
End Sub
hope this helps
 
Top