The ID (counter field) of a newly inserted record is available immediately after the AddNew method executes. Retrieving the ID at this point means you don’t have to mess with the LastModified property and bookmarks. You can clear the variable used to store the ID if you cancel the update. Try this code from a button Click event:
With Data1.Recordset .AddNew MsgBox !ID .CancelUpdateEnd With
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.























