ACC: Combo Box in Continuous Form Shows Incorrect DataID: Q128158
|
Moderate: Requires basic macro, coding, and interoperability skills.
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.
The behavior occurs under the following conditions:
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.
Table: My Products
--------------------------
Field Name: Category ID
Data Type: Text
FieldSize: 4
Field Name: Product ID
Data Type: Number
FieldSize: Long Integer
Query: Product Combo Query
------------------------------------------------------
Type: Select
Field: ProductID (or Product ID in versions 1.x and 2.0)
Table: Products
Field: ProductName (or Product Name in versions 1.x and 2.0)
Table: Products
Field: CategoryID (or Category ID in versions 1.x and 2.0)
Table: Products
Criteria: Forms![My Products Form]![Category Combo]
Click the check box in the Show row in the Category ID column to
clear the check box.
Macro Name Macro Action
------------------------------------
Refresh Product Combo Requery
Refresh Product Combo Actions
------------------------------
Requery
Control Name: Product Combo
RecordSource: My Products
Combo box:
Name: Category Combo (Control Name in version 1.x)
ControlSource: Category ID
RowSourceType: Table/Query
RowSource: Categories
ColumnCount: 2
BoundColumn: 1
ColumnWidth: .2 in
Left: 1.1
Top: 0
After Update: Refresh Product Combo
Combo box:
Name: Product Combo
ControlSource: Product ID
RowSourceType: Table/Query
RowSource: Product Combo Query
ColumnCount: 2
ColumnWidth: 0
BoundColumn: 1
Left: 3.1
Top: 0
Detail Section:
Height: .17
For more information about the AutoLookup technique, please see the
following article in the Microsoft Knowledge Base:
Q95643 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.
Additional query words: blank
Keywords : kbusage FmsCmbo
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: April 9, 1999