title: Set ComboBox datasource in parent Form
body: <p>I am loading personnel data from database and fill a dataset as follows: </p>
  
  <pre><code>sql = " select * from personnel "
  daAdapter = New SqlDataAdapter(sql, sqlConn)
  daAdapter.Fill(dsDataset, "personnel ")
  dgvPersonnel.datasource=dsDataset.Tables("personnel ")
  
  sql = " select depId, name from department "
  daAdapter = New SqlDataAdapter(sql, sqlConn)
  daAdapter.Fill(dsDataset, "department")
  
  'Set department combobox datasource for filtering
  cmbDepartment.DataSource = dsDataset.Tables("department")
  cmbDepartment.DisplayMember = "name"
  cmbDepartment.ValueMember = "depId"
  
  'Set datasource for personnel datagridview
  dgvPersonnel.datasource=dsDataset.Tables("department")
  </code></pre>
  
  <p>Now when I double click any personnel in the dgvPersonnel I load an other form "frmPersonnelDatails" to be able to modify personnel data where I also have a combobox to select the department of the personnel. </p>
  
  <p>My Concern now is how can I set the datasource of the combobox in the "frmPersonnelDatails" form to be the department table in my dataset instead of querying the database again to load then. Meaning I do not want to query the data more than one time. I tried the following but could not get the results:</p>
  
  <pre><code>Try
      serviceNo= dgvPersonnel.Rows(dgvPersonnel.CurrentRow.Index).Cells(0).Value
      Dim form As New frmPersonnelDatails
      personnelMode = "modify"
  
      form.cmbDepartment.DataSource = dsDataset.Tables("department")
      form.cmbDepartment.DisplayMember = "name"
      form.cmbDepartment.ValueMember = "depId"
  
      form.ShowDialog()
  Catch ex As Exception
      MsgBox(Err.Description)
  End Try
  </code></pre>