Option Group Problem

G

Guest

I have a data entry form with some text boxes, combo boxes and 10 Yes/No
check boxes. Each control is bound to a field in a table. The Yes/No check
boxes are bound to Yes/No fields in the table; they are not required fields
and they have no default value. I gave the "Yes" option a value of -1 and
the "No" option a value of 0.

When the form opens to a new record, all of the fields are blank and all of
the option groups are gray. As soon as I make an entry in any of the other
controls on the form, all of the check boxes have the "No" option checked.
This is not the behavior I want (I want the user to make a choice). I have
tried setting the default value to Null--that did not work.

I experimented with creating an "unbound" option group. That works, but
then I would have to write code to save all the choices to the table.

I cannot figure out what is causing all of the "bound" check boxes to get
the "No" value. I am hoping that someone has seen this behavior before and
has a solution for me.

Thank you,
Judy
 
R

Rick Brandt

Judy said:
I have a data entry form with some text boxes, combo boxes and 10
Yes/No check boxes. Each control is bound to a field in a table.
The Yes/No check boxes are bound to Yes/No fields in the table; they
are not required fields and they have no default value. I gave the
"Yes" option a value of -1 and the "No" option a value of 0.

When the form opens to a new record, all of the fields are blank and
all of the option groups are gray. As soon as I make an entry in any
of the other controls on the form, all of the check boxes have the
"No" option checked. This is not the behavior I want (I want the user
to make a choice). I have tried setting the default value to
Null--that did not work.

I experimented with creating an "unbound" option group. That works,
but then I would have to write code to save all the choices to the
table.

I cannot figure out what is causing all of the "bound" check boxes to
get the "No" value. I am hoping that someone has seen this behavior
before and has a solution for me.

Thank you,
Judy

I don't think Access/Jet Yes/No fields allow nulls so as soon as the record
is dirtied you get zero (false) applied.

You could use an Integer field instead and it would work.
 

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