Assign value to Option Button in a Frame

The_Kurgan

Active Member
Joined
Jan 10, 2006
Messages
270
Access 2010

I have code which assigns a value to an option button when a form is loaded. When I try to put my option buttons in a frame, I get an error stating that I can't assign a value. Do I need to somehow reference the frame in order to assign a value to a control within it?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
no, the option buttons are pre-assigned in design. set the different values in properties.
the option the user chooses is assigned to the FRAME.value.

you can pre-assign the default value to the frame also, then THAT option button will light.
 
Upvote 0
Thanks for the reply. So, it's not possible to assign code to each option button within a frame?

Example:
Option1 is hit -> Label1.caption = "yes"
Option2 is hit -> Label1.caption = "no"
Option3 is hit -> Label1.caption = "maybe"
 
Upvote 0

Forum statistics

Threads
1,215,009
Messages
6,122,674
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top