Returning Autonum key

  • Thread starter Thread starter Phil Hunt
  • Start date Start date
P

Phil Hunt

I am using DAO and MS Access database. After I run a DB.EXECUTE(SQL) to
insert a record, is there a reliable to get back the value of the new
autonumber field (the primary key in this case) immediately ?

Thanks
 
No.

DMax() may work, but for a reliable way, use the AddNew method to add a
value to the Recordset.
 
Back
Top