selecting an option button from code

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
 
T

tina

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
 

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