can't retrieve value of Listbox control

  • Thread starter Thread starter Carol G
  • Start date Start date
C

Carol G

I am trying to retrieve the text value from a listbox set to no multiselect.
What I have only retrieves the selected row number
How do I retrieve the contents of the row number as text.
Both .Value and .ListIndex return the row number only.

Thanks
Carol

With lstFullName
If MultiSelect = 0 Then
intRowNumber = .ListIndex
txtSelected = .Value
Debug.Print txtSelected & " value from Option list"
Debug.Print intRowNumber & "rn from Option list"
End If
End With
 
those properties return the value in the Bound column of a listbox. to get
the value from another column in the listbox, use the Columns property, as

Me!ListboxName.Column(1)

note that listboxes columns, like those in combo box controls, have a
zero-based index. so the first column in the listbox is .Column(0), the
second column is .Column(1), the third column is .Column(2), etc.

hth
 
Hi, I am having trouble getting my combo box to dislay the correct data in
the field on the form - the correct data has been saved to my table, but is
not displayed on the form. How do I fix this one?

Thanks
Margo
 
Back
Top