title: MS ACCESS QUERY AUTONUMBER GENERATION
body: <p>My MS Access database table is linked with some excel files. Those excel files have same fields and each file has around 2000 records. I created a Union query (<code>qryUnion</code>) and clubbed all into one database. Now I need to pick a few samples out of these data. I have the sample record numbers in another table (<code>tblSample</code>). If the <code>qryUnion</code> query table has the serial numbers, then it is possible to create the database based on <code>tblSample</code>. The <code>qryUnion</code> table doesn't have any record number or serial number and it consists of non-unique data. Is there any way to do this?</p>
  
  <p>e.g.</p>
  
  <p><strong>qryUnion</strong> table</p>
  
  <pre><code>    Field1     Field2      Field3
      x1          234         455
      x2          44          88
      x2          59          24
      x5          33          54
      x1          400         4
      m2          44          094
      x4          444          4
  </code></pre>
  
  <p><strong>tblSample</strong> table</p>
  
  <pre><code>    Field1
      2
      5 
      7
  </code></pre>
  
  <p>I want a query table like..</p>
  
  <pre><code>    Field1      Field2      Field3      Field4
      x2          44          88           2
      Y1          400         4            5
      x4          444         4           7
  </code></pre>