title: display item with multiple values from listbox into textbox using access database
body: <p>I am trying to display item values in their respective textbox when an item is selected in the listbox</p>
  
  <p>this is how I have it set up:</p>
  
  <ol>
  <li><p>This is how the values are shown to the list box</p>
  
  <pre><code>        command.CommandText = "select * from ItemsList";
          OleDbDataReader reader = command.ExecuteReader();
          while (reader.Read())
          {
              EditItemBrowserBox.Items.Add(reader["ID"].ToString() + "         " + reader["ItemBrand"].ToString() + "  " + reader["ItemName"].ToString() + "  " + reader["ItemType"].ToString() + "  " + reader["ItemPrice"].ToString());   
          }
  </code></pre></li>
  <li><p>This is how i'm trying to make the values from the listbox show to a textbox</p>
  
  <pre><code>        command.CommandText = "select * from ItemsList where ItemName='" + EditItemBrowserBox.Text + "' ";
          OleDbDataReader reader = command.ExecuteReader();
          while (reader.Read())
          {
              EditIDTB.Text = reader["ID"].ToString();
              ItemNameAddTB.Text = reader["ItemName"].ToString();
              ItemTypeAddTB.Text = reader["ItemType"].ToString();
              ItemBrandAddTB.Text = reader["ItemBrand"].ToString();
              ItemPriceAddTB.Text = reader["ItemPrice"].ToString();
          }
  </code></pre></li>
  </ol>
  
  <p>EditItemBrowserBox is the listbox and <code>EditIDTB.Text = reader["ID"].ToString();</code>is me trying to show the value in one of the textboxes.</p>
  
  <p>Right now, when I click on an item nothing shows in the text boxes. Any help appreciated</p>