if you are using msAccess .you can make query which select rows on the basis of max id .and just call that query in openrecordset() !