title: Datagrid Duplication due to Select Statement VB
body: <p>I am using an Access database, I believe the problem lies in my SQL statement. I have a relational database, with two tables - </p>
  
  <pre><code>StaffDetails [columns(
  StaffID, 
  FirstName, 
  LastName)] 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>StaffTraining [columns(
  StaffID, 
  Month)]. 
  </code></pre>
  
  <p>I have a combobox (<code>cbMonth</code>) and dependent on what month is chosen if the user selects 'January' then I would like the datagrid (<code>DGTraining</code>) to show the First Name and Last Name of the members of staff whose ID are within the chosen month. Sorry if this is not the clearest explanation, hopefully my code below makes my issue clearer:</p>
  
  <pre><code>Dim SqlQuery As String = "SELECT [StaffDetails.StaffID], [StaffDetails.FirstName], [StaffDetails.LastName], [StaffTraining.StaffID] FROM [StaffDetails], [StaffTraining] WHERE StaffTraining.TrainingMonth='" &amp; cbMonth.Text &amp; "'"
      Dim da As OleDbDataAdapter = New OleDbDataAdapter(SqlQuery, conn)
      Dim ds As DataSet = New DataSet
      da.Fill(ds, "Training")
      Dim dt As DataTable = ds.Tables("Training")
  
      With DGTraining
          .AutoGenerateColumns = True
          .DataSource = ds
          .DataMember = "Training"
      End With
  </code></pre>