Option Groups

Howlsta

Vampire Slayer
Local time
Today, 10:48
Joined
Jul 18, 2001
Messages
180
How do you code the after update event of an option group?

I've got three options in my group and would like to do something like below:

if myOptionButton1 is selected then
me.mycontrol.visible = false
elseif myOptionButton2 is selected then
etc....
 
View the properties of the option group. I don't have my wizards installed at home so I can't see if the Events Tab is there. If it is, then set your code on the AfterUpdate of this OptionGroup property.

If not, you could run the code on the BeforeUpdate property of the control that gains focus after your option group is selected.
 
In the After Update event of the Option Group code something like this should work:

Select Case OptionGroupName
Case 1
Me.MyControl.Visible = True
Case 2
Me.MyControl.Visible = False
Case 3
Me.MyControl.Enabled = False
End Select
 
I guess I'm following Jack around tonight. So Jack ...since I can't check it out..You CAN set AfterUpdate property for the WHOLE option group?
 
jwindon -

Yep. That is the way to do it. The Option group returns only one value so it is easy to tell which one the user selected, as you can tell from the Select Case statement that I used above.
 

Users who are viewing this thread

Back
Top Bottom