I have a report based off of a query. In the query is a field [EECommentDate]. In the report, I want to display the latest comment only on the report. How would I do this?
Perhaps you could set the control source of a text box to:
[tt]=DLookUp("Comment","qryQuery","EECommentDate=#" & Format(DMax("EECommentDate","qryQuery"),"yyyy-mm-dd") & "#")[/tt]
I would create a query that returns the latest value (possibly grouped by some other unknown field) and use the query in the report's record source.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
SELECT EEComments
FROM QryEEINfo
WHERE EECommentDate =(SELECT Max(EECommentDate) FROM QryEEInfo);
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.