checkbox

  • Thread starter Thread starter ryan.fitzpatrick3
  • Start date Start date
R

ryan.fitzpatrick3

I have 2 checkboxes, I want it so only one can be selected not both,
so how do I do this? More or less if the left one is clicked I'd like
the right one to be disabled and vise versa. Would this be if
statement?
 
In the after update event of the check boxes you could use code similar to
this (input your actual control names)

Private Sub MyCheck_AfterUpdate()
Me.OtherCheck = Not Me.MyCheck
End Sub

Private Sub OtherCheck_AfterUpdate()
Me.MyCheck = Not Me.OtherCheck
End Sub

Another "option" would be to use an option group, which would only allow
one selection at a time.
 
Awesome that worked! Thanks

In the after update event of the check boxes you could use code similar to
this (input your actual control names)

Private Sub MyCheck_AfterUpdate()
Me.OtherCheck = Not Me.MyCheck
End Sub

Private Sub OtherCheck_AfterUpdate()
Me.MyCheck = Not Me.OtherCheck
End Sub

Another "option" would be to use an option group, which would only allow
one selection at a time.
 
Back
Top