Option Group

Spider
StarLounger
Posts: 96
Joined: 11 Feb 2010, 21:59
Location: Ohio

Option Group

Post by Spider »

Hi all,
I am pretty new with option groups and have been researching them - but I cannot get them to behave on my form.
I'm adding a survey to an existing database so I will be having about 23 option groups on a tab control form - hope that is not a problem.

At first I used the wizard to say I did not want a default - but every one I created had a default anyway - the last option choice was defaulted.
So, I added a "No Answer" to the group and used the wizard to say I wanted it to default to "No Answer" with a value of "0".
But now there is no default selected.

I know that the default should be set at the group level - but what I thought I understood is that:
- In the properties of the option group - I should "Name" each group -so I did -example: Q1a
- I should say something like [Q1a]=5 in the Default Property in the properties box
I'm assuming that the "5" above is the option in the group that I want to be the default.

I would like a "No Answer" default.
Is there something I'm missing?
Thanks so much.
Vicky

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Option Group

Post by HansV »

Each of the option buttons within an option group (a frame around the option buttons) has an Option Value property. The Option Values of the option buttons within one option group should be unique, but there's no objection to different option groups having the same range of option values.

When you open the form and click one of the option buttons, the Option Value of that option button will be the Value of the option group as a whole.

If you set the Default Value of an option group to the Option Value of one of the option buttons within the group, that option button will be pre-selected when you open the form. If you leave the Default Value blank, none of the option buttons will be pre-selected, and the value of the option group will initially be Null.

BTW, I have attached a very simple demo survey database. Perhaps it'll give you some ideas.
Survey2K.zip
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

Spider
StarLounger
Posts: 96
Joined: 11 Feb 2010, 21:59
Location: Ohio

Re: Option Group

Post by Spider »

Thanks for the explanation and example!
I double checked all of the option groups and they are set to the value of "0" -which is the value I assigned to "No Answer".
The field in which it is stored in the database also has a default value of 0.
When I close the form and re-open - 4 of the groups have no default. All four are on the 2nd tab of the tab control form.
I attached a screen print of the properties example. Maybe I'm doing that part wrong.
It will take some time to strip down a version if you would like to see it.
Thanks again,
Vicky
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Option Group

Post by HansV »

That looks OK, I have no idea why the default value isn't being stored for some of the option groups.
Best wishes,
Hans

Spider
StarLounger
Posts: 96
Joined: 11 Feb 2010, 21:59
Location: Ohio

Re: Option Group

Post by Spider »

I did not have all of the values set to default in the table! (I thought I did)
I set ALL of the defaults in the table to "0" - the option groups are fine now....