I was playing around I know that you used the Phone: DLookUp("Phone","Sheet1","Customer=""" & [Customer] & """ AND [Order Date]=#" & [MaxOD] & "#"), to find the last Phone. When I used Phone2: DMax("Phone","Sheet1","Customer=""" & [Customer] & """ AND [Order Date]=#" & [MaxOD] & "#") I ended up with the same results. Is there a difference from the DLookup verses DMax?
Donald Blackwell
@Reply 12 months ago
Dlookup will give you the first "Phone" it finds in "Sheet1" that meets the requested paramaters
DMax will give you the highest (max) "Phone" it finds in "Sheet1" that meets the requested paramaters.
If they're both returning the same "Phone" then the first one it finds is also the largest (max). If there is only one "Phone" provided, they will both give the same result. As would "DMin"
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 22.