opton buttons not working

R

Ruth

I created an option group on my form with yes value of (1) or no value of (2)
as the options which should be stored in a single field in my table. When I
open the form and click the check box nothing happens.

Does anyone know what could be wrong?
 
M

mscertified

Nothing is supposed to happen at that point. The value should be saved when
you either navigate to another record or exit from the form. Did you check
if the table column is being updated?

Dorian
 
M

Marshall Barton

Ruth said:
I created an option group on my form with yes value of (1) or no value of (2)
as the options which should be stored in a single field in my table. When I
open the form and click the check box nothing happens.


Are you sure you added the check boxes to the option group
or did you just drag them over the top of the frame area?
 
R

Ruth

My data type in the table is yes/no. I need the check mark to print on the
form and store the data in the table.
 
M

Marshall Barton

Ruth said:
My data type in the table is yes/no. I need the check mark to print on the
form and store the data in the table.


I thought you said the option group had values of 1 or 2? A
yes is True (-1) and no is False (0). Double check both
check boxes to make sure you their OptionValue property set
correctly.

It does seem rather odd to use an option group with two
check boxes to represent a YesNo field when a single check
box (not in an option frame) eill do the job. The
non-standard values (1 or 2) will both be converted to True
when stored in the table so all this seems like it's doomed
to be a problem.
 
R

Ruth

Thank you very much. I changed the values to -1 and 0 and it is working now.
I set this up as an option group because I didn't want someone to be able to
choose both by accident. We are governed by the FDA... and the Regulatory
and Quality guru's around here are really picky when it comes to this sort of
thing.

Could I have set this up a better way other than what you've already
described?
 
M

Marshall Barton

Ruth said:
Thank you very much. I changed the values to -1 and 0 and it is working now.
I set this up as an option group because I didn't want someone to be able to
choose both by accident. We are governed by the FDA... and the Regulatory
and Quality guru's around here are really picky when it comes to this sort of
thing.

Could I have set this up a better way other than what you've already
described?


Well there are lots of elaborate ways to set a YesNo field's
value (your option group, a combo box, etc), but why not use
a single check box (without an option fram) so there can't
possibly be any confusion. A check box bound to a YesNo
field can only be selected or not (i.e. True or False, the
same as your current arrangement).
 
Top