enable/disable option buttons based on combo box

G

Guest

Hello,

I have a form with some radial option buttons. I would like to enable or
disable some of those buttons depending on what is chosen in a combo box
above the option group.

Is this possible?

Thanks,
 
R

Rick Brandt

Marc said:
Hello,

I have a form with some radial option buttons. I would like to enable
or disable some of those buttons depending on what is chosen in a
combo box above the option group.

In the AfterUpdate event of the ComboBox...

If Me.ComboBoxName = "Your test value" Then
Me.RadioButtonName.Enabled = False
Else
Me.RadioButtonName.Enabled = True
End If

Or shorter...

Me.RadioButtonName.Enabled = Not (Me.ComboBoxName = "Your test value")
 
G

Guest

Marc,

How and when you want to enable or disable the option button, you just need
something like:

If Me.Check21 = True Then
Me.Option5.Enabled = False
Else
Me.Option5.Enabled = True
End If

In this case, I am using check box Click event and setting the Enabled
property for the specific option button I want to control.
 
G

Guest

Thanks for responding so quickly Klatuu,

Marc

Klatuu said:
Marc,

How and when you want to enable or disable the option button, you just need
something like:

If Me.Check21 = True Then
Me.Option5.Enabled = False
Else
Me.Option5.Enabled = True
End If

In this case, I am using check box Click event and setting the Enabled
property for the specific option button I want to control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top