title: Create duplicate records in a query for MS Access
body: <p>I have the following table in a Microsoft Access Database:</p>
  
  <pre><code>TableName: Cabinets
  RoomID - Number
  Wall ID - Number
  Cabinet ID - Number
  Width - Number (double)
  Height - Number (double)
  Depth - Number (double)
  Quantity - Number
  </code></pre>
  
  <p>What I need to do is create a query that will duplicate each row for a number of times specified in the Quantity field.  As an example, let's say that I have the following data:</p>
  
  <pre><code>Room ID    Wall ID     Cabinet ID     Width     Height     Depth     Quantity
  1          1           1              30        34.5       24        1
  1          1           2              42        34.5       24        1
  1          1           3              18        34.5       24        2
  </code></pre>
  
  <p>I need to have a query that would create the following:</p>
  
  <pre><code>Room ID    Wall ID     Cabinet ID     Width     Height     Depth   
  1          1           1              30        34.5       24     
  1          1           2              42        34.5       24       
  1          1           3              18        34.5       24       
  1          1           3              18        34.5       24       
  </code></pre>
  
  <p>Now, I have seen, in other questions, that I can create a 'numbers' table to accomplish this, unfortunately, I can't change the table at all.  In fact, I am very limited to what I can actually do with this database.</p>
  
  <p>Here is what I can do:</p>
  
  <ol>
  <li>Create a Query that will pull the data </li>
  <li>Create a Query that will add a 'view' to the database at runtime (before the query to pull the data is run)</li>
  </ol>
  
  <p>Any help that can be given would be greatly appreciated.  Thank you very much in advanced.</p>