ACC2000: Combo Box in Continuous Form Shows Incorrect Data (208866)
The information in this article applies to:
This article was previously published under Q208866 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb).
SYMPTOMS
When you select a row in a combo box in a continuous form or a form that is
open in Datasheet view, the text portion of the combo box in other records appears empty.
CAUSE
The behavior occurs under the following conditions:
- The form is a continuous form, or it is open in Datasheet view so that you can view multiple records.
- The combo box's RowSource property is set to a parameterized query to limit the number of rows in the combo box based on criteria in
another field in the form.
- The combo box criteria for the current record eliminate the rows
that were selected in the other records.
Microsoft Access maintains only one query recordset for a combo box rather
than one recordset for each combo box in each record.
When the criteria changes for the query that the combo box is based on,
rows that were selected in the other records may be eliminated from the
recordset. As a result, the non- BoundColumn values are no longer available to be displayed.
RESOLUTION
Do not hide the BoundColumn field. If you want to see a different column, use the DLookup() function or the AutoLookup technique to display the information that you want in another control on the form.
REFERENCESFor additional information about the AutoLookup technique, click the article number below
to view the article in the Microsoft Knowledge Base:
209672 ACC2000: Example of Row Fix-Up in the Northwind Orders Form
For more information about the autolookup technique, click Microsoft Access Help on the
Help menu, type create an autolookup query that automatically fills in data in the Office Assistant or
the Answer Wizard, and then click Search to view the topics
returned.
Modification Type: | Major | Last Reviewed: | 6/24/2004 |
---|
Keywords: | kbprb kbusage KB208866 |
---|
|