I want to load the **ItemName** from sql table to **Listbox**
and get **ItemId**, **ItemName** and **Details** values to textboxes.

[![enter image description here](https://i.stack.imgur.com/dwLlc.png)](https://i.stack.imgur.com/dwLlc.png)

so far I have this code everytime I open or load the window its shows the itemName in the listbox. which is good.

```
Dim cmd As New SqlCommand("select * FROM Items")
cmd.Connection = connection
Dim adp As New SqlDataAdapter(cmd)
Dim dt As New DataTable()
adp.Fill(dt)
ListBox1.DataSource = dt
ListBox1.DisplayMember = "ItemName"

```

but the problems is:
what do I have to do, if I click one of the items in the listbox and it will automatically show the itemId, ItemName and Details in the textboxes from sql table. I need some help. thank you!

[![enter image description here](https://i.stack.imgur.com/9chBI.png)](https://i.stack.imgur.com/9chBI.png)