Option group help

  • Thread starter Thread starter Bruce
  • Start date Start date
B

Bruce

I am attempting to create an option group on a form, but
cannot. I used the option group wizard to create Yes/No
checkboxes in an option group that is tied to a Yes/No
field in a table. When I create a single check box for
the field it work fine, However, the option group does
not work. It does not "light up" or whatever terminology
Acess "Help" uses, and I cannot place a check mark. If I
use a default value I can see that, but if I click the
other option both boxes are blank. It is probably
something simple, but since I used the wizard I can't
figure what more I am supposed to do. Also, the check box
is gray in design view. It looks OK in form view, except
it is useless.
Assuming I get this to work, how do I place the Yes and No
check boxes onto a report so that it can be seen which box
was selected?
 
If you want to bind a Yes/No field to an Option Group, you will need to set
the individual Option Values to:

Yes -1
No 0
 
Thanks so much. Not much of a wizard, is it? If that was
in the Help files, it was either deeply buried or
hopelessly enigmatic. One more question on this: Can I
keep the boxes blank until somebody chooses one? I tried
different default values for the option group, but the
best I could do was to have the new record show both check
boxes blank until I selected a name from the first combo
box, when it reverted to Yes.
 
Did some more investigating, and learned that yes and no
are the only choices in a yes/no field. In other words, I
can't have both boxes blank. In order for both to be
blank, I need to change the data type in the field, but to
what? Integer? Text? Since I can't have a check box in
the table, I would prefer that I have Yes or No, but when
I attempted a text field and those values I ended up with -
1 and 0 or something like that. When I query the table I
would prefer that the criterium be "Yes" or "No" rather
than trying to remember which number I need for Yes or
No. I can get it to work (I would rather they not be
gray, but I can accept that limitation), but I would
rather the data be stored in a form that is intuitive to
understand (i.e. Yes and No).
 
My recommendation would be to stick with the defaults that Microsoft has
provided for Yes/No fields, as you will find that all other work in editing,
displaying and querying on that field type will be much easier. However, if
you must have a field that can be 'Yes', 'No' or Null, you could make it
Integer with no default value. And, use the standard -1=True and 0=False
for its non-null values.
 
Thanks again. I too am inclined to stay with Yes and No,
since those are the only choices. I would prefer that No
be an active choice, but I can accept it as the default
choice. I will have to find out if there will ever be a
null value in that field. If so, I can revert to the
integer data type as you have suggested. And I thought
this was going to be simple.
 
Back
Top