Option Group coding

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Upon opening a form which has an Option Group, I want to have my VBA code
either enable or disable one particular option group button. How do I do
this? In other words, how do you modify the attributes of option group
buttons using VBA?
 
You can toggle the availability of an option button like this:
With Me.[NameOfYourOptionButtonHere]
.Enabled = Not .Enabled
End With
 
Thanks for the answer. I guess I didn't try that. It seems inconsistent
with Access conventions. The option button is a control, not a form
property, so why does this work?

I had tried Me![NameofOptionButton].Enabled, which it seems to me should
work, but it doesn't.

ctdak


Allen Browne said:
You can toggle the availability of an option button like this:
With Me.[NameOfYourOptionButtonHere]
.Enabled = Not .Enabled
End With

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

ctdak said:
Upon opening a form which has an Option Group, I want to have my VBA code
either enable or disable one particular option group button. How do I do
this? In other words, how do you modify the attributes of option group
buttons using VBA?
 
Back
Top