Solved Permanently display columns of ListBox ? (1 Viewer)

Etxezarreta

Member
Local time
Today, 20:55
Joined
Apr 13, 2020
Messages
175
Hello all,

I would like to display the different columns of ListBoxes permanently, that is to say not only when lists are dropped.
When the user checks the form, without dropping lists then, he only visualizes the value of the first column, and he needs to click on the list to check the values of the other fields to make sure he will pick the right value.
I usually do a work-around concatenating the fields I want to display in the first row of the listbox, but I guess there is way smarter ways to do.
Many thanks in advance.
Etxe.
 

bob fitz

AWF VIP
Local time
Today, 19:55
Joined
May 23, 2011
Messages
4,719
I'm not sure of your requirement. A Listbox control can not be dropped, so I assume that what you have is a combo box that, when dropped, shows other columns which you would like to display on the form using one or more textboxes.
Create a textbox and set its Control Source property to:
=NameOfComboBox.Column(1)
to show the value in the second column. The column count number (in brackets) is zero based, so the first column is (0) the second is (1) the third is (2) etc.
You could have a textbox for each column or you could show multiple columns in one textbox with something like:
=NameOfComboBox.Column(1) & ", " & NameOfComboBox.Column(2)
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:55
Joined
May 7, 2009
Messages
19,231
Listbox dont dropdown?

You can use vba to set the Column with of the column to show, then do a Dropdown again.

EDIT:
There is no way to show All column of combobox.

Maybe add an unbound textbox to your form.
When an item is selected on the list, show the concatenated result to this textbox.
 

Users who are viewing this thread

Top Bottom