Home All Groups Group Topic Archive Search About

Query to find last entry of date

Author
23 Feb 2005 4:16 PM
Mark
I have an contact history table that contains a variety of
fields including contactid and completedate.  The
completedate is automaticaly populated with a date when a
new history record is added.

I now what to write a query that pulls from this table the
last entry, based on completedate, for each contactid.

How do I do this?

Thank you in advance for you input

Author
23 Feb 2005 4:45 PM
PC Datasheet
Create a query based on your contact history table. Only include the fields:
ContactID
CompleteDate
Click on the Sigma (looks like E) button on the toolbar at the top of the
screen. Under CompleteDate, change GroupBy to Max.
The query will return the most current CompleteDate for each ContactID.

--
                                        PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
                              resou***@pcdatasheet.com
                                 www.pcdatasheet.com




Show quote
"Mark" <anonym***@discussions.microsoft.com> wrote in message
news:0c8b01c519c3$079a5880$a601280a@phx.gbl...
> I have an contact history table that contains a variety of
> fields including contactid and completedate.  The
> completedate is automaticaly populated with a date when a
> new history record is added.
>
> I now what to write a query that pulls from this table the
> last entry, based on completedate, for each contactid.
>
> How do I do this?
>
> Thank you in advance for you input

AddThis Social Bookmark Button