Display only last record in a certain table

whoisit

Registered User.
Local time
Today, 16:30
Joined
Oct 27, 2004
Messages
28
With this query i would like only to display the last record in a certain table. How would i do that.
I have tried to use the totals to show the last record but it doesn't work because i have calculations in my query. Any suggestions
THANK YOU
 
Last edited:
Last record

Try this:

Suppose you have an ID field (Autonumber) in the query which is based on the table.
In the grid, sort that field descending.
Then go to the query properties and set Top Values to 1
 
The functions Last(), First(), DLast(), and DFirst() refer to the physical position of a record in a recordset. If the recordset is not specifically sorted on a unique identifier with the Order by clause in a query, there is NO way to predict which record will end up first or last. Many people use Last when they actually mean "most recient" or "highest value". If you need to retrieve the most reciently added record, you will need to have either a column containing the date/time a record was added or preferably an autonumber primary key. In either case, you can use Max(YourTimestamp) or Max(YourAutonumberKey) to retrieve it.
 
Thanks a lot for the replies
Trucktime your suggestion worked so thank you
 

Users who are viewing this thread

Back
Top Bottom