title: vb.net clear combobox items
body: <p>I have two comboboxes that are related. My problem is my combobox2 items will not reset/clear as i select item from combobox1. Instead it keeps adding/appending the new items in the bottom of combobox2. I tried  <code>ComboBox2.DataSource = Nothing</code> and   <code>ComboBox2.Items.Clear()</code> before adding the new items but it still not clear it.</p>
  
  <pre><code>Private Sub ComboBox1_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.Validated
      ComboBox2.DataSource = Nothing
      ComboBox2.Items.Clear()
      ComboBox2.Items.Remove(ComboBox2.DisplayMember)
      sql = "select brgyname,idbrgy from barangay where idmun=" &amp; ComboBox1.SelectedValue.ToString
      da = New Odbc.OdbcDataAdapter(sql, con)
      da.Fill(ds, "cbBrgy")
      ComboBox2.DataSource = ds.Tables("cbBrgy")
      ComboBox2.DisplayMember = "brgyname"
  End Sub
  </code></pre>