Get displayed text from ListBox?

E

Ed from AZ

I have a ListBox control formatted as a drop-down list. The data
comes from a query that prodeuces two columns - the autonumber and the
text value. The control is formatted to display the text values by
setting Column Count to 2 and Column Widths to 0";1.5". The Bound
Column is 1.

Me.LstBx.Value returns the Bound Column data which is the AutoNumber
value. What property can I use to return the displayed text that the
user selected in the listbox?

Ed
 
D

Danny Lesandrini

You need to access the Columns collection of the combo box.

strName = Me!lstYourListBox.Columns(1)
 
E

Ed from AZ

Hi, Danny.
You need to access the Columns collection of the combo box.

   strName = Me!lstYourListBox.Columns(1)


Debug.Print Me.lstVehType.Column(1)

got me what I needed. Thank you!!

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top