Retieve last dates in a query

F

Frikkie

How do i get the last dates out of a table in a query
My query looks like this
Station Code and set number Date off inspection
CNC 18 10/11/2005
CNC 18 23/02/2006 1
CNC 19 24/07/2006
CNC 19 24/01/2007 2
CNC 20 07/02/2008 3
CNC 20 16/07/2007

I want to see the dates of no 1 ,2 and 3 in my Query
can you help me please
Thanks
 
J

Jeff Boyce

(caution: untested)

One way might be to create a new query based on this table, select the
[StationCode] and [InspectionDate] fields, then click the <Totals> button on
the Toolbar.

The words "Group By" will show up under each field. Change this to "Max"
for the [InspectionDate] field.

This should group all [StationCode] values together, selecting the maximum
[InspectionDate] for each.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
F

Frikkie

Thanks Jeff
--
FM


Jeff Boyce said:
(caution: untested)

One way might be to create a new query based on this table, select the
[StationCode] and [InspectionDate] fields, then click the <Totals> button on
the Toolbar.

The words "Group By" will show up under each field. Change this to "Max"
for the [InspectionDate] field.

This should group all [StationCode] values together, selecting the maximum
[InspectionDate] for each.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Frikkie said:
How do i get the last dates out of a table in a query
My query looks like this
Station Code and set number Date off inspection
CNC 18 10/11/2005
CNC 18 23/02/2006 1
CNC 19 24/07/2006
CNC 19 24/01/2007 2
CNC 20 07/02/2008 3
CNC 20 16/07/2007

I want to see the dates of no 1 ,2 and 3 in my Query
can you help me please
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top