How to Create Auto-Incrementing Numbers in Microsoft Access
Question details
Create an automatically assigned number for records 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.
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.
Use an AutoNumber field for unique record identifiers
Use AutoNumber when you need Access to assign an identifier that users cannot directly edit.
In the Navigation Pane, right-click the table and select Design View.
In a blank row, enter a field name such as RecordID and select AutoNumber in the Data Type column.
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.
Save the table, open it in Datasheet View, and add a record. Access assigns the AutoNumber value automatically.

Use DMax to suggest the next custom number
Use a DMax expression when you need to explore a custom counter rather than rely on an AutoNumber identifier.
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.

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.




