Radio Button Problem

rbsorensen

New member
Local time
Today, 06:21
Joined
Jan 1, 2009
Messages
8
I am having a problem with the use of radio button arrays on an Access subform.

When clicking a radio button in a group of several, the selection will not change, and the originally selected button remains as the currently selected one.

Here are the specifics:

1. There are eight option groups (frames) on the subform containing four radio buttons each.

2. Each option group is associated with a different integer field in the query attached to the subform.

3. The values of the four buttons in each option group are respectively 0, 1, 2, and 3.

4. The value of the associated database integer fields will set the selected button when the subform is opened (default field value is zero). The form open event contains code to verify that the field values are in the range of 0-3 (null values are set to zero).

5. The enabled property is "true", and the locked property is "false" for each button.

The first button is each option group is selected by default. If, for example, the second button is clicked, the first button retains the selected status.

Any ideas as to why this is not working properly?
 
Sounds like you didn't actually add an option group, but instead added a frame and several independent radio buttons. How did you add them? If you add them using the Option Group and with the wizard selected it should add them correctly where only one will retain a value at any one time.
 
And welcome to Access World Forums, by the way :)
 
Bob,

Thanks for the welcome - I appreciate your hosting this forum.

In regard to your question, they are indeed option groups, and they were created via the Access wizard.

Clicking on the properties for the frames indicates that the object type is "Option Group". The ControlSource property contains the database field which supplies the initial value and contains the result.

Furthermore, I know that the radio buttons all belong to their own option group because they all move when the groups are repositioned on the form.

Rich Sorensen
 
Then I read it incorrectly the first time. What it seems then is that your form's recordsource may not be updateable. Can you open the underlying query and make a change? Has your form had the AllowEdits property set at all?
 
Bob,

Thanks for the welcome - I appreciate your hosting this forum.

Just a point of clarification - I am not hosting this forum. I just answer questions here. It is owned by Jon (not sure of his last name) who actually owns the business on the other part of this website.
 
The "AllowEdits" property for both the form and the subform are set to "Yes", but the DataEntry properties for both were set to "No"

I changed the DataEntry properties to "Yes" and the form stopping working altogether, so I changed both of them back. Now the option buttons are working but sometimes they clear other fields when they are set, and I am getting some very weird results.

This is strange.
 
Figured out the problem.

I am adding this code to an existing form, and the logic turns off the "AllowEdit" parameter in some cases.

Thanks for pointing me in the right direction.
 
Cool, thanks for posting back with your success.

thumbsup.png
 

Users who are viewing this thread

Back
Top Bottom