I am using
Code:
=DMax("customername","CustomerAssignments","CarNumber = " & [Forms]![f_EMEUpdates]![CarNumber] & " And CarInitials ='" & [Forms]![f_EMEUpdates]![CarInitials] & "'")
I also use
Code:
=DMax("customerbegin","CustomerAssignments","CarNumber = " & [Forms]![f_EMEUpdates]![CarNumber] & " And CarInitials ='" & [Forms]![f_EMEUpdates]![CarInitials] & "'")
And that one works fine I think because it is a date. However, as you mentioned using a Dmax for text will yield different results, I am not sure what it considers the max. That is why I want to look up the most recent ID but return the text value in the customer field of that record. Dmax and Dlookup both only look up the max of the field you put in the first criteria.
What I need to be able to do is look up the Max ID for records with the current carnumber and car initials but return the customername that is in that record.