How to display latest date from record

EileenJohn

Registered User.
Local time
Today, 02:27
Joined
Nov 23, 2016
Messages
12
Hi, i have this tablestaff
Date staffID
11/22/2016
..
..
11/23/2016
..
..
11/24/2016

My query:
Select tablestaff.staffno, max(tablestaff.date)as maxofdate
From tablestaff
Groupby tablestaff.staffno
But.. it still not giving me all the staff ID with latest date.
 
What are you getting?
For example:

Date StaffID
11.17.2016. 1234
11.17.2016. 1235
11.17.2016. 1236
11.18.2016. 1237
11.18.2016. 1238
11.19.2016. 1239
11.19.2016 1240
I want it to show latest date only

Date. StaffID
11.19.2016. 1240
11.19.2016. 1240
 
..
I want it to show latest date only

Date. StaffID
11.19.2016. 1240
11.19.2016. 1240
Use 2 queries:
1. query, find the latest date, without the StaffID.
2. query, link query 1, and the table by Date, select the date and the StaffID.

Don't call a field name Date, then date is a reserved word in MS-Access.
 
Use 2 queries:
1. query, find the latest date, without the StaffID.
2. query, link query 1, and the table by Date, select the date and the StaffID.

Don't call a field name Date, then date is a reserved word in MS-Access.
Thank you so muchhhhh..
 
You're welcome, good luck. :)
 

Users who are viewing this thread

Back
Top Bottom