title: Microsoft Access - Creating a Query based on the Results of Another Query
body: <p>This query generates a table of customer id's:</p>
  
  <pre><code>SELECT Transactions.customerId
  FROM Transactions 
  WHERE Transactions.purchaseDate &lt;#9/1/2012#
  GROUP BY Transactions.customerId
  HAVING  Sum(Transactions.amountPaid)&lt;&gt;0;
  </code></pre>
  
  <p>This query generates a table of transactions:</p>
  
  <pre><code>SELECT Customers.firstName, Customers.lastName, Transactions.transactionId, Transactions.product, Transactions.purchaseDate, Transactions.amountPaid, Customers.customerId
  FROM Customers INNER JOIN Transactions ON Customers.customerId = Transactions.customerId
  WHERE (((Transactions.refundTransaction)=False));
  </code></pre>
  
  <p>I want to select all of the transactions (second query) from only users generated by the first query. </p>