Others

How to Create Auto-Incrementing Numbers in Microsoft Access

Adam DavisAdam Davis Nov 25, 2026 868 views

Question details

Create an automatically assigned number for records in Microsoft Access.

How to Create Auto-Incrementing Numbers in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
A database creator wants reliable record identifiers or a custom sequential counter for educational purposes.
Observed behavior
New records should receive an identifier automatically without relying on inexperienced users to enter it.
Before you start

Open the database and identify the table that needs a numbered field. Check whether the table already has a primary key and whether multiple users will add records at the same time.

Solution 1Recommended

Use an AutoNumber field for unique record identifiers

Use AutoNumber when you need Access to assign an identifier that users cannot directly edit.

1
Open the table design

In the Navigation Pane, right-click the table and select Design View.

2
Add the identifier

In a blank row, enter a field name such as RecordID and select AutoNumber in the Data Type column.

3
Set the key if appropriate

If the table does not already have a primary key, select the new field row and choose Primary Key on the ribbon. If it already has a primary key, retain it unless you have a reason to change the database design.

4
Save and test

Save the table, open it in Datasheet View, and add a record. Access assigns the AutoNumber value automatically.

Use an AutoNumber field for unique record identifiers
Numbers may have gaps: AutoNumber is intended for unique identifiers, not gap-free numbering. Deleted records, canceled entries, and database maintenance can affect the sequence.
Free Microsoft Office alternative

Manage Numbered Lists in WPS Spreadsheets

WPS Office is a free, lightweight Office alternative with a familiar interface and support for common Office formats, making spreadsheet migration straightforward. WPS Spreadsheets can organize numbered lists, but it does not replace Microsoft Access database features or fix Access numbering issues.

Organize numbered records in a spreadsheetOpen and edit Microsoft Excel XLS and XLSX filesWork with a familiar Office-style interfaceUse a free, lightweight suite for everyday documents
microsoft office alternative - wps office

Frequently Asked Questions

Can users edit an AutoNumber field directly?

No. Access assigns AutoNumber values automatically, and users cannot directly edit them in normal data entry.

Does AutoNumber guarantee consecutive numbers?

No. AutoNumber is designed for unique identifiers, so gaps can occur. Do not use it when a gap-free sequence is required.

What happens if DMax finds no existing values?

In =Nz(DMax("[YourFieldName]","YourTableName"),0)+1, Nz replaces the null result with zero, so the expression suggests 1.

Is DMax safe for multiple users adding records?

Not by itself. Two users can receive the same suggested value. Set the numeric field's Indexed property to Yes (No Duplicates) and handle duplicate-save errors, or use AutoNumber for a unique record identifier.