Microsoft KB Archive/319480

= ACC2000: How To Display a Yes/No Field in Two Check Boxes =

Article ID: 319480

Article Last Modified on 1/7/2006

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q319480



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SUMMARY
When you create a form based on a table with a Yes/No field, you may prefer to create two check boxes on the form: one to display the Yes selection, and another to display the No selection. This article demonstrates how to create such a form.



MORE INFORMATION
To display Yes and No values in dedicated check boxes, follow these steps:  Create a new, blank database, db1.mdb.  Create a new table with the following properties:   Table: tblTable1 --  Field Name: City Data Type: text

Field Name: Selection Data Type: Yes/No   Enter the following data in Table1:   City            Selection -  Vancouver       Yes Los Angeles    No   Berlin          Yes   Create a new form with the following properties:   Form: frmTestForm --  RecordSource: tblTable1

Text box --  Name: txtItem ControlSource: City  Insert an option group in frmTestForm.</li> In the Option Group Wizard, type Yes and No to create two labels, and then click Next.</li> Click No, I don't want a default, and then click Next.</li> Under Values, type -1 for the Yes label and 0 for the No label. Click Next.</li> Click Store the value in this field; in the drop-down list box, click Selection, and then click Next.</li> Click to select the Check boxes check box, and then click Finish.</li> Open your form in Form view, and then test the Option Group control.</li></ol>

<div class="references_section">