title: MS Access SQL query results
body: <p>I have two tables:</p>
  
  <pre><code>rapprovals_tbl
  
  rId rAssignment rState  rApprover   rapprovaldt rType   rNotes
      12345678                    
  1   12345679    Paid    12345678    31/05/2015 18:23    Flex    
  5   12345679    Approved    12345678    14/05/2015 18:23    Normal  
  6   12345679    Pending         Normal  
  
  timerecord_tbl
  
  RowID   Assignment1 wMonth  StartTime   EndTime     
  1   12345679    Mar-15  17/03/2015 11:29    18/03/2015 16:12    Flex    
  5   12345679    Mar-15  17/03/2015 11:00    17/03/2015 12:00    Normal  
  6   12345679    Mar-15  17/03/2015 11:50    18/03/2015 16:11    Normal  
  </code></pre>
  
  <p>I have form with two combo boxes, which are linked and worked on this source;
  Box 1 -</p>
  
  <pre><code>Select [staffid] FROM [control_tbl] WHERE [supervisorid]  = '12345678'
  </code></pre>
  
  <p>Box 2</p>
  
  <pre><code>SELECT timerecord_tbl.[RowID]
  FROM timerecord_tbl
  INNER JOIN rapprovals_tbl ON timerecord_tbl.RowID = rapprovals_tbl.rId
  WHERE (((timerecord_tbl.[Assignment1])='" &amp; Box 1 &amp; "'
      AND (rapprovals_tbl.[rState] is null ) Or (rapprovals_tbl.[rState] = 'Pending' )));
  </code></pre>
  
  <p>I want to get only those RowID  which are related to Box 1 employee record in Box 2.</p>
  
  <p>How do I go about this, currently its listing all row ids.</p>
  
  <p>I would appreciate any help. </p>