hi there. no problem re: helping out....
not clear on what you are wanting now tho, sorry.
your original post, i thought you wanted the details of the last service visit, so what i was doing was first finding the last SERVICE DATE, then getting the details attached to that date. is what you want now different than that?
sounds like you have successfully gotten the MAX SERVICE DATE for the customer who's ID you are looking at on the main form, right?
is what you mean now is that you have a field called "LAST SERVICE VISIT" and you only want to show the max date for LAST SERVICE VISIT = 'SERVICE'?
if so, just add it to the 'where' portion of the dmax statement. please check out dmax, dlookup, dcount etc in HELP or a text book-it will explain what this is all about.
you'd put in something like
Code:
=DMax("[Date of Visit]","[Service History]","ID = " & [Forms]![Customers]![ID] & " and [Last Service Visit] = 'Service'")
i know the different sets of quotes and amersands (&) can be confusing but you'll get the hang of it after a while. what your WHERE clause looks like is (i.e. if it's ID=2):
where ID = 2 and [Last Service Visit] = "Service"
that's how it ends up getting parsed out when you type it in like i wrote it in the dmax statement above.
so try that out and see how it works.
have fun!!
g