Microsoft KB Archive/223239

= ACC2000: Bound Combo Box Does Not Display Values =

Article ID: 223239

Article Last Modified on 11/21/2002

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q223239



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

This article applies only to a Microsoft Access project (.adp).



SYMPTOMS
After you upsize a form that has a combo box bound to a Yes/No field in a table, the combo box no longer displays data in a Microsoft Access project. When you try to select a value with the combo box, the value that you specify is saved, but it is not displayed.



CAUSE
When you upsize a database to SQL Server or MSDE, Yes/No fields in your tables are automatically converted to bit columns on SQL Server. If you bind a combo box to a bit column in an Access project, you must display and store Boolean values as True or False, not as -1 or 0.



RESOLUTION
Modify the RowSource property of your combo boxes, replacing -1 with True, and 0 with False.



MORE INFORMATION
The following steps reproduce and correct the behavior described in the "Symptoms" section of this article.

Steps to Reproduce Behavior
 Create a new database named MyTestDatabase. Create the following table in the MyTestDatabase database, and then save the table as MyTestTable:

 In Design view, add two records to the MyTable table:

 Close the table, and create a new form. Base the form on the MyTable table. Drag the MyPK and MyChar fields from the field list to the detail section of your new form. (If you cannot see the field list, click Field List on the View menu.)</li> If the toolbox is not visible, open it by clicking Toolbox on the View menu.</li> Make sure that the Control Wizards are not active (the button in the toolbox does not appear pressed in), and then select a combo box.</li> Place the combo box in the detail section of the form.</li> Modify the properties of the combo box as follows:

</li> Save the new form as MyForm.</li> Open the form in Form view. Note that either "True Value" or "False Value" is displayed in the combo box.</li> Close the form.</li> Run the Upsizing Wizard by clicking the Tools menu, pointing to Database Utilities, and then clicking Upsizing Wizard.</li> Upsize the MyTestDatabase database, choosing to migrate all tables to Create a new client-server application.</li> After the upsizing process is complete, examine and close the upsizing report. When you close the report, the new Access project that is created for you by the wizard opens automatically.</li> Open the MyForm form in the Access project. Note that no values are displayed in the combo box.</li>  Open the MyForm form in Design view, and change the Row Source property of the combo box to the following: <pre class="fixed_text">  "True Value";True;"False Value";False </li> Save the form, and then reopen it in Form view. Note that values are now displayed in the combo box.</li></ol>

<div class="references_section">