You will need to set up a dummy table called like
Max Record ID of the XYZ table with one and only 1 record in it. It will be Record 1.
Then make a relationship to your details table and make the reference field on the right side be a formula field which calculates to 1. The formula will be, well , 1.
Then do a summary maximum of the [Record ID#] field and look that up down to the details table.