title: How to join two of the same query with a different parameter (MS Access)
body: <p>I have a query in MSAccess called <code>ClaimQry</code> which prompts the user for a parameter, <code>valuationDate</code>.  I want to run <code>ClaimQry</code> with some valuation date, say, 1/1/2011 and then run the same query with another valuation date, 1/1/2012 and join the two result sets based on a field, <code>claimNumber</code>.</p>
  
  <p>I tried </p>
  
  <pre><code>SELECT ClaimQuery.Total, ClaimQuery_1.Total
  FROM ClaimQuery 
  INNER JOIN ClaimQuery AS ClaimQuery_1 ON ClaimQuery.[Claim #] = ClaimQuery_1.[Claim #];
  </code></pre>
  
  <p>But I was only prompted to enter a single valuation date instead of two (thus my resulting data was incorrect).</p>
  
  <p>Edit: Starting to think my question might not be clear, so I'll try to give an example.</p>
  
  <p>Suppose I run <code>ClaimQuery</code> and feed it 1/1/2011 for the <code>valuationDate</code> parameter.  I might get a result set like</p>
  
  <pre><code>Claim# Total
  123    100
  231    200
  132    300
  </code></pre>
  
  <p>Then I run <code>ClaimQuery</code> and feed it 1/1/2012 for the <code>valuationDate</code> parameter and I get</p>
  
  <pre><code>Claim# Total
  123    400
  231    500
  132    100
  213    600
  </code></pre>
  
  <p>Now, I want to perform a join on those two sets, and get something like</p>
  
  <pre><code>Claim# Total1 Total2
  123    100    400
  231    200    500
  132    300    100
  </code></pre>