selecting an option button from code

  • Thread starter Thread starter KK
  • Start date Start date
K

KK

Hi

How to select one of the unbound
option buttons in a group?

I have 2 option buttons.
At form load I want one of them
to be selected by default.

But optionbutton.value

doesn't work

rgds
KK
 
you need to set the default value of the option *group* control, not a
button in the group. try

Private Sub Form_Load()

Me!MyOptionGroupControlName.DefaultValue = something

End Sub

replace "something" with the value of the option group button's OptionValue
property.

hth
 
Back
Top