Fix the Null Primary Key Error When Splitting a Microsoft Access Database
Question details
The user needs to resolve a Null primary key or index error that occurs 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.
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.
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.
In Access, select File > New > Blank database, choose a name, and click Create.
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.
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.
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.
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.

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.

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.




