Hi Richard, I've redone this several times now, using this: ContactNotes: IIf(IsNull([MaxOfDateTime]),"No Contacts",DLookUp("Notes","ContactT","CustomerID=" & [CustomerID] & " AND DateTime=# " & [MaxOfDateTime] & "#")) and the 'No Contacts' message is appearing where it should, but for some reason, the rest of the contact info is returning an error. I went back to my contactT to see if I could figure out why the error, but can't. The error message I'm getting is: Syntax error in date in query expression 'CustomerID=121 AND DateTime=# 01/08/2014 3:23:20 p.m.'. I checked the notes, and there is definately notes for that datetime field in the contactT. Where do you think I may have gone wrong? BTW, I would LOVE to be as savvy as you in Access, your knowledge is amazing. Thanks for the great, easy to understand, lessons. Lynda
Reply from Richard Rost:
Again, it's all about spacing. This time you have a SPACE where there shouldn't be one:
AND DateTime=# " & [MaxOfDateTime] & "#"
This gives you:
DateTime=# 1/1/2000#
See the problem?
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
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 11.