OPEN DATABASE (HOME(2) + "Northwind\Northwind") >SELECT DIST ; > Customers.customerid, Customers.contactname, ; > Invoices.OrderID, Invoices.orderdate ; > FROM Customers ; > JOIN Invoices ON Customers.customerid = Invoices.customerid ; > WHERE Invoices.customerid + DTOS(Invoices.orderdate) IN ( ; > SELECT customerid + MAX(DTOS(orderdate)) FROM Invoices ; > GROUP BY customerid) >The compound key ought to do the trick. I need more than one field, so MAX() may not give me the right answer, but it's definitely the place to start. Just in case you don't hear it enough: Thanks again, Sergey.