File Corruption & Recovery

Fix the Null Primary Key Error When Splitting a Microsoft Access Database

Steven ParkerSteven Parker Nov 13, 2026 869 views

Question details

The user needs to resolve a Null primary key or index error that occurs when splitting an Access database.

Fix the Null Primary Key Error When Splitting an Access Database
Product
Microsoft Access
Device & OS
not provided
Scenario
Splitting an Access database into front-end and back-end files while retaining its existing tables and records.
Observed behavior
Access reports that an index or primary key cannot contain a Null value during the split.
Before you start

Note which tables contain records and whether their primary keys use AutoNumber or another data type. Close other connections to the database before inspecting its table design or retrying the split.

Solution 1Recommended

Find the affected table and correct its keys or indexes

Use this approach to isolate the table that triggers the error and inspect its data and design before splitting again.

1
Create a test database

In Access, select File > New > Blank database, choose a name, and click Create.

2
Import tables individually

In the blank database, select External Data > New Data Source > From Database > Access. Browse to the original database and import one table at a time. Note any table that produces an error.

3
Inspect the table design

In the original database, right-click the suspect table and select Design View. Identify its primary key fields, then open Design > Indexes and check indexed fields for invalid definitions.

4
Check and correct the data

Open the suspect table or create a query to inspect its key fields. For a field that may contain missing values, enter Is Null in the query's Criteria row. Correct invalid records or index settings as appropriate, preserving relationships between tables.

5
Retry the split

After correcting the affected table, open the original database and select Database Tools > Access Database. Follow the Database Splitter wizard to create the back-end database.

Find the affected table and correct its keys or indexes
Empty tables are not necessarily a problem: A table with no records does not by itself explain the error. If all tables import successfully, inspect their key and index definitions and investigate other database issues before retrying.
Free Microsoft Office alternative

Work with Office spreadsheets and documents in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface and support for common Microsoft Office formats, making it easier to move everyday document and spreadsheet work. It does not repair or split Microsoft Access databases.

Review exported tabular data in WPS SpreadsheetsOpen and edit common Microsoft Office formats, including XLSX and DOCXUse familiar spreadsheet and document editing toolsMove everyday Office files to a lightweight suite
microsoft office alternative - wps office

Frequently Asked Questions

How can I find which table causes the split error?

Create a blank Access database, then use External Data > New Data Source > From Database > Access to import tables one at a time. Note any table that fails to import.

Can an empty table cause the Null primary key error?

An empty table does not by itself cause this error. Check the table's design and indexes, and examine populated tables for invalid data.

How do I find missing values in a key field?

Create a query containing the table and key field, enter Is Null in the field's Criteria row, and run the query. For a composite key, check each key field.

Can WPS Office split or repair an Access database?

No. Use Microsoft Access to inspect and split the database. WPS Spreadsheets can work with tabular data exported to a supported spreadsheet format such as XLSX.