So you have an option group (frame) that contains two option buttons (radio
buttons), and you also have a combo box called "Select Category", which you
only want enabled when the second button is selected.
You say, at present, the combo box is enabled when you open the form. Is
that correct?
If so, then you should add the following code to the form's Current event:
Me.SelectCategory.Enabled = (Me.fraMyOptionGroup = 2)
....where SelectCategory is the combo box, and fraMyOptionGroup is the option
group frame.
Note: You can also put the same code in the option group's AfterUpdate
event.
You also say that it stopped working correctly when you changed the combo
box to 2 columns. Make sure you changed the following combo box properties:
RowSource - to ensure the query is returning two columns.
ColumnCount - to indicate the number of columns returned by the
RowSource (in this case, 2).
ColumnWidths - to reflect the width of each column returned by
RowSource. If you don't want a particular column to display, set it at zero.
BoundColumn - to reflect the column that will be saved to the field
listed in ControlSource.
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
JMorrell said:
I changed an option group slightly and now it doesn't behave the way it
used to. I changed a "SelectCategory" to 2 columns instead of 1. The
option group has 2 radio buttons where selecting the second button "wakes
up" the "SelectCategory". When I open the dialog form, radio button 1 has
focus, but the SelectCategory is lit up. If I select the second radio
button and then the first one, the SelectCategory gets grayed out. When I
remove the second column (back to the way it was originally), all works as
it should. What's up?