Get displayed text from ListBox?

  • Thread starter Thread starter Ed from AZ
  • Start date Start date
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
 
You need to access the Columns collection of the combo box.

strName = Me!lstYourListBox.Columns(1)
 
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
 
Back
Top