List box shows first column of each field in a table

guamlet

Board Regular
Joined
Dec 29, 2002
Messages
145
I have a list box that is to be populated by whatever is found in a particular table called [IHC details]. The table, [IHC details], has several fields in it, that are all referenced back to other tables that contain the allowable variables for input. For instance, [IHC details].[ExpID] is a field that contains a combobox where you can select from an indexed list of names. I set this field to have 2 columns. The first colun is the primary key (numbered 1 to n), and the second column contains the text that I would like to see. I set the column widths in this to be 0";2" to achieve that.

Now, when I try to populate a listbox with the information from this table, all i see are the primary keys for each of the fields, not the text. Does anyone know how to fix this?

Muchas gracias in advance,


Guamlet
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

cstlaurent

Board Regular
Joined
Jan 14, 2005
Messages
182
First you will need to go in the property tab of this control.

In the property box, under the format tab. Modify

Column Count = 2
Column widths = 0;3 (by indicatint 0 for the first column, it will hide your ID KEY) and show the rest of the data.

Good luck
 

guamlet

Board Regular
Joined
Dec 29, 2002
Messages
145
Thanks for the advice. I've tried that already, and all it does is show one column of data. The problem is that the table that is populating the listbox contains several fields that are multi-column. The especially irritating thing about this is, I've gone and done a query, and the query shows the information in the format I would like to see it in my listbox (i.e. the Primary keys are hidden, and the columns of text are shown). I've tried to copy the SQL code behind the query into the Row Source of the list box, as well as directly calling the query from the listbox, but both of those methods also only show the Primary Keys for each field, not the text. There's got to be something that I'm missing...Access can't be this ignorant!

Guamlet
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,057
Messages
5,835,163
Members
430,343
Latest member
t0m_c

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top