ACC: Only One Button Accepts Selection in Yes/No Option Group

Last reviewed: May 28, 1997
Article ID: Q97510
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

When a form contains an option group with two option buttons, and the values of the option buttons are set to values 0 and 1 respectively, and the option group is bound to a Yes/No field in a table, only the option button with value 0 can be selected.

CAUSE

In Microsoft Access, the value 0 represents FALSE, and any other value represents TRUE. In a field of data type Yes/No, TRUE values are assigned the value -1. If you click an option button that has a value of 1, the Yes/No field to which the option group is bound is changed to -1, or TRUE.

The option button attempts to put the value 1 into the Yes/No field. But because the field is of data type Yes/No, the field is set to -1 for any value other than 0. Because the value of the option button is set to 1 and the Yes/No field now contains a -1, the button does not appear to be selected.

RESOLUTION

Change the option value for the second button from 1 to -1.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. In a form, create an option group for a Yes/No field in a table.

  2. Add two option buttons to the group.

  3. Set the option value for Button1 to 0.

  4. Set the option value for Button2 to 1.

  5. View the form in Form view. Note that any attempt to click Button2 fails.


Additional query words: radio button
Keywords : FmsHowto kbusage
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.