Click to See Complete Forum and Search --> : last record


freek
July 23rd, 1999, 07:21 AM
How can I find out which record has last been added to a table
(without using autonumber)

Dr_Michael
July 23rd, 1999, 07:55 AM
I think there is a switch (SQL) called Top1 which returns the last record (maximum ID). So, you might use something like:

select Top1 from 'Table'




Michael Vlastos
Company MODUS SA
Development Department
Athens, Greece
Tel: +3-01-9414900

Ravi Kiran
July 23rd, 1999, 08:37 PM
There is a .LastModified property of the Recordset that provides the last edited/added record for BookMarking purpose. It doesn't return you the record. But you can use something like
with tmprecset
.BookMark = .LastModified
' here you can use the fields
end with
Ravi Kiran