Skip to content
Getting the New AutoNumber ID in Microsoft Access VBA episode artwork

Oct 28, 2026 8 min

Getting the New AutoNumber ID in Microsoft Access VBA

from Computer Learning Zone Hosted by Richard Rost

When VBA adds a new record in Microsoft Access, you often need the AutoNumber ID immediately afterward. That ID lets you open the exact order, customer, or log entry your code created instead of guessing based on the highest number or the newest-looking row. In this episode, Richard explains why relying on Max(ID), sort order, or the last record in a form can fail in a multi-user database. Someone else may add a record at nearly the same time, leaving your code pointed at the wrong row without producing an obvious error. The discussion uses a recordset and AddNew example from a food log database, showing the basic idea of returning the newly assigned ID from a function. With that key in hand, your calling code can reliably find the new record, move the form to it, or use it to create related records after the save succeeds.

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

Getting the New AutoNumber ID in Microsoft Access VBA

0:00 8:47

No transcript yet.

Requests help us decide what to transcribe next.

Frequently asked questions

How long is this episode of Computer Learning Zone?

This episode is 8 minutes long.

When was this Computer Learning Zone episode published?

This episode was published on October 28, 2026.

Can I download this Computer Learning Zone episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.