Showing the last record (1 Viewer)

E

Eugene Anderson

Guest
I am trying to create a query that will show who should be a work at a given time. In my table, I have a start time, and an end time. In another table, I have an audit time. They are linked by the date. The query works great, but the problem I run into is that I have multiple audit times for a particular date, and I only want to see the latest audit. How can I fix this?
 

Jon K

Registered User.
Local time
Today, 12:11
Joined
May 22, 2002
Messages
2,209
If I understand your problem correctly, I think you can achieve what you desired by first creating a total query from the audit time table e.g.

queryLatestAudit:-
SELECT [DateField], Max([AuditTimeField]) as LatestAudit
FROM AuditTimeTable
GROUP BY [DateField]

Then you can join queryLatestAudit with the other table on their date fields in a SELECT query.

Hope this helps.
 
Last edited:

Users who are viewing this thread

Top Bottom