ACC1x: How to Display Yes/No Choices in a Combo Box or List Box |
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 : kbusage
Issue type : kbhowto
Technology :
Last Reviewed: November 4, 2000 |