469,334 Members | 4,230 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,334 developers. It's quick & easy.

Most recent date

I have a databse tracking container movements. I am happily recording
each movement and the date of movement and can see where each
container is by sorting by date of movement. Is there a way I can
produce a query which would show, for each container, only the most
recent move
Jun 27 '08 #1
3 1321
In Design View for the query, select View - SQL and paste this in,
substituting
your actual object names for ContainerID , MovementDate and
ContainerTrackingTable

SELECT ContainerID AS Expr1, Max(Movementdate) AS max_date
FROM ContainerTrackingTable
GROUP BY ContainerID;

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200805/1

Jun 27 '08 #2
On May 17, 10:56*pm, "Linq Adams via AccessMonster.com" <u28780@uwe>
wrote:
In Design View for the query, select View - SQL and paste this in,
substituting
your actual object names for ContainerID , MovementDate and
ContainerTrackingTable

SELECT ContainerID AS Expr1, Max(Movementdate) AS max_date
FROM ContainerTrackingTable
GROUP BY ContainerID;

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/2008...
Thank you - works like a charm
Jun 27 '08 #3
Glad to help!

Steve wrote:
>On May 17, 10:56 pm, "Linq Adams via AccessMonster.com" <u28780@uwe>
wrote:
>In Design View for the query, select View - SQL and paste this in,
substituting
[quoted text clipped - 11 lines]
>>
Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/2008...

Thank you - works like a charm
--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com

Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Nova's Taylor | last post: by
3 posts views Thread by TJM | last post: by
6 posts views Thread by HandersonVA | last post: by
4 posts views Thread by doublej0 | last post: by
4 posts views Thread by Lee | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by haryvincent176 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.