Last record date in each group

Gismo

Registered User.
Local time
Today, 07:06
Joined
Jun 12, 2017
Messages
1,298
Hi all

Having a struggle to get the last record or greatest date of a group of categories
Not sure how to describe this so hopefully below will paint a picture

From Engine, i only need to see the Nut which has the latest date
From Body, I only need to see the Clamp which has the latest date

Please could you guide me in the correct direction to accomplish this

CategoryItemDate
EngineWasher07/02/2022
EngineNut29/02/2020
EngineBolt15/02/2022
BodyFrame08/02/2022
BodyHinge18/02/2022
BodyClamp28/02/2022
 
use simple Select query:

select Category, Item, [Date] From yourTable
where [Date] = DMax("[date]", "yourTable", "Category = '" & [category] & "'")


Bolt is your Latest date, Nut has 2020 year.
 
use simple Select query:

select Category, Item, [Date] From yourTable
where [Date] = DMax("[date]", "yourTable", "Category = '" & [category] & "'")


Bolt is your Latest date, Nut has 2020 year.
Yeh sorry, finger trouble, bolt should be 2022 which would be the last in that category and clamp in the body category
 

Users who are viewing this thread

Back
Top Bottom