I have following Table "Replaced" in MS Access.
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
Query requirement
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.
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.
Any ideas? I have also looked at Replacing Values in SQL (Microsoft Access) but it does not help.
 
     
    