Query only latest record

joltremari

Registered User.
Local time
Today, 04:50
Joined
Jun 4, 2001
Messages
24
Can I make a query that will only query the last record of a field. This is so I am getting the last entry.

ex: As we update our maps we enter into the "Last Updated" field the month and year of the update, so as to have a running history at the same time. (by the way these are subrecords of another relational table)

I have a query that now that you can enter a number of years in a text box and it will query all the "Last Updated" that is greater that many years ago. So if I enter 5 it will give me all the records from "Last Updated" that are greater than 5 years old.

The problem is it queries ALL the records when I want it to only query that last record.

I hope this made sense!

Any help is appreciated.

JO
 
You could try making a top 5 and changing it in SQL to 1. However, Access will return all records that match the returned record. So for example if the criteria you use to deside top 1 is date, it will return all records for todays date.
 

Users who are viewing this thread

Back
Top Bottom