title: VB6 get a value selected in a combobox
body: <p>I'm building a combobox with the following: </p>
  
  <pre><code>Select 1 or 2 seats:
  1
  2
  </code></pre>
  
  <p>And I need to show 1 or 2 as selected depending on the result of a query. </p>
  
  <p>How can I do that? </p>
  
  <p>I have done so far: </p>
  
  <pre><code>SQL = " SELECT numberOfSeats FROM mytable "
  SQL = SQL &amp; " WHERE userID ='"
  SQL = SQL &amp; txtuserID.Text &amp; "'"
  Set auxRes = UAN.OpenResultset(SQL, rdOpenDynamic, rdConcurValues, 0)
  
  cmbNumberOfSeats.Clear
  cmbNumberOfSeats.AddItem "Select 1 or 2 seats"
  cmbNumberOfSeats.AddItem "1"
  cmbNumberOfSeats.AddItem "2"
  </code></pre>
  
  <p>Thanks!!</p>