title: Inner Join Excel recordset with Access recordset
body: <p>Is it possible to make an inner join between an excel spreadsheet and and access database table?
  I tried many ways to make this possible but with no success.</p>
  
  <p>This is my Visual Basic 6 code:</p>
  
  <pre><code>Dim DbTemp As Database
  Dim ExcelDB As Database
  DIm xlsRs As Recordset
  
  Set DbTemp = OpenDatabase(App.Path + "\mydb.mdb")
  Set ExcelDB = OpenDatabase(App.path + "\QueryExcelDATA.xls", False, True, "Excel 8.0;")
  Set xlsRS = ExcelDB.OpenRecordset(query, dbOpenDynaset) ' query is a sql query I used to get some other results
  
  Do Until xlsRs.EOF
          Workspaces(0).BeginTrans
              sql =  "INSERT INTO Presenze(Enterprise, Emp_ID, mYear, mMonth, mDay, WorkHours) " _
                   &amp; " SELECT Presenze.Emp_ID, '"+xlsRs("Entps")+"', '" + xlsRs("Yr") + "', '" + " _
                   &amp; " xlsRs("Mnth") + "', '" + xlsRs("Dy") + "', '" + xlsRs("WH") + `"' " _
                  &amp; " FROM [ExcelDATA$] INNER JOIN Presenze On [ExcelDATA$].[CardID] = Presenze.CardID"
              DbTemp.Execute sql
          Workspaces(0).CommitTrans
          xlsRS.MoveNext
  Loop
  </code></pre>
  
  <p>I want to get the data from [ExcelData$] spreadsheet and insert them to access Table "Presenze"
  Can anyone help me?</p>