Yes/No Field

G

Guest

I created an option group for a yes/no field in a table on my form. When I
created the option group I indicated that I did not want a default value to
show. However the checkbox always shows up as the yes option checked. I look
in the properties of the option group after I created it to see if there was
somewhere I could change it to no default but I can't seem to find it. Does
anyone know why this option group defaults to yes. I am using Access 2003.

Thanks in advance for any help.

Best regards,

Dee
 
A

Allen Browne

The Yes/No field in an Access table is not capable of storing a Null. It
must be either yes or no. Better databases do allow for the third state.

If you want to be able to store a Null, change the field to a Number type in
your table. It can then be True (-1), False (0) or Null (not
applicable/unknown.)

Presumably the 2 buttons in your option group have their Option Value
properties set to -1 and 0 respectively.
 
G

Guest

Hi Allen,

Thank you for your help. It is on the form where I have made the yes/no
field an option group that I want no default. I did do this on another part
of the form and neither option Yes or No are selected. It is odd that it
would work and then not work. But when I tried to do it for another yes/no
the yes radio button is always selected. I looked in the option group
properties for the option group and the "default value" is blank. I don't
know why it worked for one option group and not another. So it is in the form
that I don't want the either option button selected.

Best regards

Dee
 
G

Guest

I noticed the same [in my case, the "no" checkbox gets checked, sometimes]...
Maybe it's better to just set a default value, that way you can at least
control which one it is.
 
G

Guest

I suggest replacing the Check Box with option buttons or toggle buttons.
They have no default value.
As Allen suggested, make one button's option value -1 for Yes (True) and the
other 0 for No (False)

The set the Default Value of the Option Group to Null. Neither button will
show as selected until you make a selection.
 
G

Guest

The check box is not a good control to put in an Option Group. I would
suggest you replace it with two option or toggle buttons. They have no
default value, only an option value. Make the option value of one -1 for
Yes and the other 0 for No. This will provide the correct values for the
Yes/No field. Set the Default Value of the Option Group to Null. Neither
button will show as selected until you make a selection.
 
A

Allen Browne

What kind of field is the option group bound to (its Control Source)?

What is the Option Value of the check boxes in the group?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top