selecting last inserted or updated record from Access table .

Hello ..
I want by using sql statement to select last iserted or updated record from Access table .
Any Idea ?
Who is Participating?

Improve company productivity with a Business Account.Sign Up

isilverConnect With a Mentor Commented:
This works the best if you have a autonumber with the database.  The line is listed below

select * from [table] where [autonumber field] in (select max([autonumber field]) from [table])

[table] - The talble of the record you want to look up.
[autonumber field] - The field that contains the autonumber.  The reason I say to use the autonumber is because the last record that you add will be the largest number.
isilver, your comment gives the last inserted record, but how to get last updated record???
yazan3000Author Commented:
Thank's isilver
do you have any idea about last updated record ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.