title: MSAccess: Get ItemIDs from Recordsetclone into New Table?
body: <p>I have an AccessDB app where I need to grab the ItemIDs for the current user-applied filter into a new table to use downstream.  Using the subform datasheet .recordsetclone property I can see the desired recordset, .recordcount reports the correct number of records.  Otherwise, the following does not produce the desired temp table and AccessVBA does not complain.</p>
  
  <pre><code> Dim db As DAO.Database
   Dim rstItemIDs As DAO.Recordset
   Dim strSQL as String
   Set db = CurrentDb
  
   set rstItemIDs = Forms!Mainform![Data subform].Form.RecordsetClone
   msgbox rstItemIDs.recordcount  'reports the correct result 
  
   strSQL = "SELECT rstItemIDs.ItemID INTO tempTable FROM rstItemIDs;"
   db.Execute strSQL
  </code></pre>
  
  <p>Is it possible to construct a SQL Select query against a dao.recordset?</p>
  
  <p>Thanks for any pointers you can provide.</p>