title: MS Access Query to display latest Active Part Number
body: <p>I have following Table "Replaced" in MS Access.</p>
  
  <pre><code>ID  PartNumber  ReplacedNumber  Status
  4   b                       Active
  5   c           b           Replaced
  6   d           b           Replaced
  7   e           c           Replaced
  8   h           d           Replaced
  9   104308          408077-0102 Replaced
  10  310224          408077-0102 Replaced
  11  0R5888          408077-0102 Replaced
  12  4N6515          408077-0102 Replaced
  13  4N6860          408077-0102 Replaced
  14  408077-0102 408077-5102 Replaced
  15  408077-5102 408077-5102S    Replaced
  16  408077-5102S                Active
  </code></pre>
  
  <p>Query requirement</p>
  
  <p>The final answer for any of these numbers (104308, 310224, 0R5888, 4N6515, 4N6860, 408077-0102, 408077-5102, 408077-5102S) should be 408077-5102S as this number has superseded all the rest. So, if my query has a criteria, [Please Enter part number to find the latest number], the resultant number should be 408077-5102S. As, it is the only Active number and has superseded all the rest.</p>
  
  <p>Similarly, The final answer for any of these numbers (b, c, d, e, h) should be b as this number has superseded all the rest. So, if my query has a criteria, [Please Enter part number to find the latest number], the resultant number should be b. As, it is the only Active number and has superseded all the rest.</p>
  
  <p>Any ideas? I have also looked at <a href="https://stackoverflow.com/questions/12972219/replacing-values-in-sql-microsoft-access">Replacing Values in SQL (Microsoft Access)</a> but it does not help.</p>