disable check box based on other checkbox

deb

Active Member
Joined
Feb 1, 2003
Messages
400
Access 365
Within my main form f_pac,
I have 3 check boxes (USA, Canada, Combined)

I need to have them enabled/disabled.

If either USA or Canada is checked then disable Combined.
and
if Combined is checked disable USA and Canada.

How can I do this?
 
you untick and that enables again.
Okay. Yes, you could have everything enabled if anything is unticked (open all choices again).
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Absolutely agree that option buttons would be more elegant. However, if they must be check boxes for some reason (perhaps they are bound which would suggest that there are 3 table fields instead of one) then this should work:

Code:
Private Sub chkCanada_Click()
  If Me.chkUSA = -1 Then Me.chkUSA = 0
  Me.chkCombined.Enabled = Not Me.chkCanada
End Sub

Private Sub chkUSA_Click()
  If Me.chkCanada = -1 Then Me.chkCanada = 0
  Me.chkCombined.Enabled = Not Me.chkUSA
End Sub

Private Sub chkCombined_Click()
  Me.chkCanada.Enabled = Not Me.chkCombined
  Me.chkUSA.Enabled = Not Me.chkCombined
End Sub
Maybe OP is absent because he/she got the answer from some other forum...
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,164
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top