Simple combobox ?

macwiz

New member
Local time
Yesterday, 18:18
Joined
Mar 24, 2009
Messages
6
Hello,

I have several forms that use comboboxes to lookup the friendly text to go with a code / ID. I store the ID's in the table the forms reference and lookup the friendly text using the combobox with it's query.

All of this works, except I'd like to display both the code and the friendly text in the form. I've manipulated the column widths for the combobox, but if the first column width >0 (ID) it only displays the ID. Only when the first column's width is = 0 does the friendly text appear.

Any thoughts?

Thanks.
 
Hello,

I have several forms that use comboboxes to lookup the friendly text to go with a code / ID. I store the ID's in the table the forms reference and lookup the friendly text using the combobox with it's query.

All of this works, except I'd like to display both the code and the friendly text in the form. I've manipulated the column widths for the combobox, but if the first column width >0 (ID) it only displays the ID. Only when the first column's width is = 0 does the friendly text appear.

Any thoughts?

Thanks.
You can only show one column at a time in a combo box. So, if you want to show both columns then you will need to use concatenation to show it. So in the underlying query for the combo, you can use this to still use the same ID field but for the display you concatenate:

Select ID, [ID] & Chr(9) & [YourDescriptionFieldNameHere] As MyNewDesc _
FROM YourTableNameHere

(The Chr(9) is a tab character to give it a clean look).
 
Ah, my mistake. Somehow I got the impression more than one column could be shown. Thanks.
 

Users who are viewing this thread

Back
Top Bottom