PRMiller2
Technical User
- Jul 30, 2010
- 123
This is a weird one. I have a combo box called cboProperty. It is populated by a query displaying five columns. My list widths are set to hide the first column (the primary key) and display all others. The list displayed when a user opens the combo box is fine. However, once they select an item, the control displays the primary key, not the other fields. Here's the query:
Here are the Format values for the combo box:
Column Count: 5
Column Widths: 0";0.65";1.65";0.65";1.5"
Column Heads: Yes
List Rows: Yes
List Width: 4.375"
Separator Characters: System Separator
Width: 4.375"
Date values:
Control Source: fk_PropertyID
Row Source: qry_SelPropertyByStreet
Row Source Type: Table/Query
Bound Column: 1
I can't figure this one out. Worse, there's another combo box on the same form that displays a different value just fine. What am I missing?
Code:
SELECT property.pk_propertyID, property.streetNumber AS House, IIf([direction1] Is Null,"",[direction1]+" ")+IIf([streetName] Is Null,"",[streetName]+" ")+IIf([streetSuffix] Is Null,"",[streetSuffix]+" ")+IIf([direction2] Is Null,"",[direction2]+" ") AS Street, property.unitNumber AS Unit, city.cityName AS City
FROM property
LEFT JOIN city ON property.fk_CityID = city.pk_CityID
ORDER BY property.streetName, property.streetNumber, property.unitNumber;
Here are the Format values for the combo box:
Column Count: 5
Column Widths: 0";0.65";1.65";0.65";1.5"
Column Heads: Yes
List Rows: Yes
List Width: 4.375"
Separator Characters: System Separator
Width: 4.375"
Date values:
Control Source: fk_PropertyID
Row Source: qry_SelPropertyByStreet
Row Source Type: Table/Query
Bound Column: 1
I can't figure this one out. Worse, there's another combo box on the same form that displays a different value just fine. What am I missing?