Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo box showing more than one field

Status
Not open for further replies.

ggreg

Programmer
Mar 9, 2001
201
0
0
US
Can you using a combo box, when you view in the drop down
you can see more than one field but when you make the selection only the one field shows is there an easy way
to show more then one field after making the selection in
the properties box?
 
No, there is not an "easy" way to show multiple columns after picking an item from the list. What I generally do to display extra columns is to put a TextBox somewhere near the ComboBox, set the TextBox "Enabled" property to No, the "Locked" property to Yes, and the "BackStyle" property to Transparent. Then I set the "ControlSource" property of the TextBox to display one of the columns from the ComboBox, for example:
Code:
=[cboPartNumber].[Column](1)
This will display the second column from the ComboBox list. The first column is Column 0.
 
Thanks jfischer,

That is what we ending up doing, but wanted to see
if it could be done.
 
I've done this a few times. The SQL for the Lookup is:

SELECT TblName.FieldID AS xyz_ID_xyz, [FieldID] & ', ' & [Field2] AS xyz_DispExpr_xyz
FROM TblName
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top