I have been trying the following;
Dim VariableName = DLookup(“Field2”, “QryName”, (Dmax Field2(Dmax Field1))
But can’t quite see why it is not working.
The SQL for the query that I am referring to is as follows:
SELECT [QrySalesEnquiries&Customer].*
FROM TblAccountLetter INNER JOIN [QrySalesEnquiries&Customer] ON TblAccountLetter.AccountLetter = [QrySalesEnquiries&Customer].AccountLetterSplit
ORDER BY TblAccountLetter.SortOrder, [QrySalesEnquiries&Customer].TblSalesEnquiries.[Customer Account Number];
Thanks