andy-h
5/1/2014 - 6:45 PM

Get ID of last inserted record in Access

Get ID of last inserted record in Access

'Get the value of the autonumber field for the last record inserted into an Access database via the current connection.

set rst = objConn.Execute("SELECT @@IDENTITY")
id = rst(0)