me.MyOptionGroup = 3
throws an error:
Run-time error '438':
Object doesn't support this property or method
Main Topics
Browse All TopicsIn Access 2000 I used to be able to do:
MyOptionGroup.value=3, which would select the Option Button that has the OptionValue of 3 assigned to it.
But now in access 2003, I've created an Option Group, and "Value" is not a property of it.
How do I select an OptionButton from VBA Code in Access 2003 (SP3 if it matters)
Thanks!!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Steps that lead to error:
1)New Form named "TestForm"
2)New OptionGroup in "TestForm" named "MyOptionGroup" with three OptionButtons,
"one"->Value 1, "two" -> Value 2, "three" ->Value 3
3)New Button named "TestButton"
4)Right Click Button, Properties, Event Tab, OnClick->Code Builder
Private Sub TestButton_Click()
me.MyOptionGroup = 3
End Sub
This sucks, there must be something different between our versions. Its weird because when I type "me." a list of controls pops up with MyOptionGroup on the list, and it auto-corrects "me" to "Me" like yours does...
Could I need some includes?
I'm using the little "Option Group" button in the toolbox that looks like an -xyz-box...wrong tool?
The Help>About first line "Microsoft(R) Office Access 2003 (11.8166.8172) SP3"
Thanks for all your help!
AHA!!! I saw your "Frame8" and decided to try it again without renaming my option group....and it worked!!!
So then I looked at the one I had named to see what was different....and sad to say, I was renaming the Label, not the optiongroup....oops.
Nonetheless, when I renamed the OptionGroup, It all worked as expected.
Thanks for your help!
Business Accounts
Answer for Membership
by: peter57rPosted on 2007-10-22 at 14:14:00ID: 20126981
Well SP3 appears to be bad news at the moment, but is probably not relevant here.
There would not have been a need to use .value previously.
me.optiongroupname = 3 should be sufficient.