J G
asked on
Display 2 columns in combobox view
I have a combo box with 2 columns. When I click on the arrow I see both of them. But when I make a selection and tab to the next field, I only see column 1 in the combo box.
How can I see both?
How can I see both?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The combobox cannot show more than your query - which returns one field only.
You must return two fields, one with the key/value to return, one with the combined values to display.
And then adjusted properties as I showed you.
/gustav
You must return two fields, one with the key/value to return, one with the combined values to display.
And then adjusted properties as I showed you.
/gustav
ASKER
I altered my query to the following, still the same result
SELECT DISTINCT tbl_Vendor_Item.Vendor_Nam e, tbl_Vendor_Item.Order_Code , [Vendor_Name] & " - " & [Order_Code] AS VendorandItem
FROM tbl_Store_Item INNER JOIN tbl_Vendor_Item ON tbl_Store_Item.PLU = tbl_Vendor_Item.PLU
WHERE (((tbl_Vendor_Item.PLU)=[F orms]![Ite m_Master]! [PLU]));
•BoundColumn: 1
•ColumnCount: 2
•ColumnWidths: 0
SELECT DISTINCT tbl_Vendor_Item.Vendor_Nam
FROM tbl_Store_Item INNER JOIN tbl_Vendor_Item ON tbl_Store_Item.PLU = tbl_Vendor_Item.PLU
WHERE (((tbl_Vendor_Item.PLU)=[F
•BoundColumn: 1
•ColumnCount: 2
•ColumnWidths: 0
Well, now you have three colums/fields. That is not two.
To hide the first tow:
But I guess you need to return the order no., thus stick with two fields:
To hide the first tow:
- ColumnWidths: 0,0
But I guess you need to return the order no., thus stick with two fields:
SELECT DISTINCT
tbl_Vendor_Item.Order_Code,
[Vendor_Name] & " - " & [Order_Code] AS VendorandItem
/gustav
ASKER
I'm a little confused.
I actually want to return 2 fields (vendor_name, order_code), and also display the 2 concatenated fields. Unless I am mistaken, the example above returns only Order_Code, and displays the 2 concatenated fields.
I actually want to return 2 fields (vendor_name, order_code), and also display the 2 concatenated fields. Unless I am mistaken, the example above returns only Order_Code, and displays the 2 concatenated fields.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
SELECT tbl_Vendor_Item.Vendor_Nam
FROM tbl_Store_Item INNER JOIN tbl_Vendor_Item ON tbl_Store_Item.PLU = tbl_Vendor_Item.PLU
WHERE (((tbl_Vendor_Item.PLU)=[F