If I understand you want the client id and the latest case note that is 60
days or older from today's date. If that is the case, the SQL should look
something like the following
SELECT [Case Note Client].[Client ID]
, Max([Case Note Client].[Case Note Date]) AS [MaxOfCase Note Date]
FROM [Case Note Client]
WHERE [Case Note Date] < DateAdd("D",-60,Date())
GROUP BY [Case Note Client].[Client ID]
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Hi Wayne, yes the max is working and now I'm trying to find the Max(Case Note
Date) > 60 So essentialy I'd like to have a report of Dates and Client ID's
where the Case Note was written 60 days or more and only the max case note(so
I only get one Case note date). Does this make any kind of sense?
:
Hi Emma
This will do what you want
SELECT TableName.ClientID, Max(TableName.CaseNoteDates) AS MaxOfCaseNoteDates
FROM TableName
GROUP BY TableName.ClientID;
Of course change Table Name and other "stuff" to what you really have in
your appliction
--
Wayne
Manchester, England.
:
Hi I have a query which gets Client ID and Case Note Dates. So the list is
something like:4 05/05/2009
4 06/05/2009
5 05/04/2009
5 06/02/2009
etc..
So how do I make the list smaller so only the largest dates are shown
ie 4 06/05/2009
5 06/02/2009
I would like to use a criteria in the query