Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Column Data from a ListBox

Status
Not open for further replies.

RSfromCO

Programmer
May 3, 2002
149
US
I have a ListBox containing several columns of data from a query. The data is customer information (number, name, address, phone, etc.). The ListBox bound data is the customer_number column.

All that I have visible in the ListBox is the customer name.

Below the ListBox, I want to have a series of TextBoxes that display the full set of data for the customer that is currently selected in the ListBox. I can get the customer number to display (because that is the bound column from the ListBox).

How can I get the selected customer name, address, phone, etc. to display in TextBoxes below the ListBox?
 
Dim strValCol0 As String
Dim strValCol1 As String
Dim strConcat As String

strValCol0 = YourListboxName.Column(0)
strValCol1 = YourListboxName.Column(1)
strConcat = strValCol0 & " " & strValCol1

Steve King Growth follows a healthy professional curiosity
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top