I have records that have tracking numbers and multiple records can have the same tracking number. I am trying to query to only have 1 of each record shown. I have a sub query that is a totals query and is set to group by the tracking number and provide the Max of a due date as shown below.
Then I have a query to inner join on the tracking number and max of due date to choose only those records from the filter query above, but add in all the other fields from the parent project as shown below.
And that works pretty well until there are multiple records with the same due date, then multiple records get queried as show below.
How do I filter by a second criteria to make sure I am only returning one record for each? I think my second criteria will be the larger of the sID, which is the auto number key for the submissions.
(One thing that I thought of while previewing this post is to run another total query on the results above and group by pID and then Max of sID and then run another inner join query to pull back in the extra fields from the project.)
Any help would be appreciated.
Here is a simplified version of the database if that is helpful:
unique records.zip