How do I select an Option button using code?

A

Ayo

I have an option group with two option button. I am trying to select one of
them using code. I tried:
Me.OptProject.Enabled=True
and
Me.OptProject.SetFocus
Neither worked. Any ideas?
Thanks
Ayo
 
A

Allen Browne

Set the Value of the option group to the OptionValue of the option button.

This kind of thing:
Me.Frame0 = Me.OptProject.OptionValue
 
W

Wayne-I-M

Hi

I can't see the point in this - whatever the option case event is then you
could do it on the event that sets the code.

But

Me.OptionGroupName.Value = 1
Or
Me.OptionGroupName.Value = 2

This will not action the group event just set the focus
 
Top