ACC: Combo Box in Continuous Form Shows Incorrect Data (128158)
The information in this article applies to:
- Microsoft Access 1.0
- Microsoft Access 1.1
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q128158
Moderate: Requires basic macro, coding, and interoperability skills.
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 for the query that the combo box is based on change,
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 you want in another control on the form.
REFERENCES
For more information about the AutoLookup technique, please see the
following article in the Microsoft Knowledge Base:
95643 ACC: Row Fix-up in the Northwind.mdb Order Form
For more information about AutoLookup, search the Help Index for
"AutoLookup queries," or ask the Microsoft Access 97 Office Assistant.
Modification Type: | Major | Last Reviewed: | 5/6/2003 |
---|
Keywords: | kbprb kbusage KB128158 |
---|
|