ACC1x: How to Display Yes/No Choices in a Combo Box or List Box

Last reviewed: May 14, 1997
Article ID: Q109381
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1

SUMMARY

This article describes how to use a list box or a combo box to display Yes and No, True and False, or On and Off selections for a field with a Yes/No data type.

MORE INFORMATION

When you use a Yes/No data type, one of three formats may be applied: Yes/No, True/False, or On/Off. However, list boxes and combo boxes do not display these formats. Instead, the actual value of the Yes/No field will be displayed. The actual value of a Yes/No field is either -1 or 0, no matter which format is applied.

In order to display values with one of the formats listed above in a list box or a combo box, the following properties must be set for the list box or the combo box:

   Object: combo box
   -------------------------
   RowSourceType: Value List
   RowSource: -1;Yes;0;No
   ColumnCount: 2
   ColumnWidths: 0 in; 1 in
   BoundColumn: 1
   List Rows: 2

   Object: list box
   -------------------------
   RowSourceType: Value List
   RowSource: -1;Yes;0;No
   ColumnCount: 2
   ColumnWidths: 0 in; 1 in
   BoundColumn: 1

The above properties will cause a list box or a combo box to display values with a Yes/No format. To use one of the other formats (True/False or On/Off) replace the words "Yes" and "No" in the properties listed above.

REFERENCES

Microsoft Access "User's Guide," version 1.1, pages 239-242


Keywords : FmsCmbo kbusage
Version : 1.0 1.1
Platform : WINDOWS
Hardware : X86
Issue type : kbhowto


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 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.