Fix Parent and Subform Key Matching Errors in Microsoft Access
Question details
Resolve a matching-record error when entering a related record in an Access subform.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A parent form holds company or client records, and a subform is used to enter related address records.
- Observed behavior
- Access reports that the database engine cannot find a matching record when the user enters data in the subform.
Identify the parent table's primary key and the corresponding foreign key in the child table. Open the parent form in Design View so you can inspect its record source and subform control properties.
Correct the Form Record Sources and Parent-Child Links
Use this approach when the parent or subform record source joins the parent and child tables unnecessarily.
In Design View, select the parent form and open Property Sheet > Data. Set Record Source to the parent table or an appropriate query that does not unnecessarily join the child address table.
Open the subform in Design View and select its form properties. Under Property Sheet > Data, set Record Source to the child address table or an appropriate child query that does not join the parent company or client table.
Return to the parent form in Design View, select the subform control, and open Property Sheet > Data. Set Link Master Fields to the parent key and Link Child Fields to the corresponding child foreign key.
Open the parent form in Form View, enter all required parent fields, and use Home > Save Record before entering an address in the subform. Confirm that the new child record receives the matching parent key.

Work With Office Files in WPS Office
WPS Office is a free, lightweight alternative for working with Office documents, spreadsheets, and presentations. Its familiar interface and format compatibility make it easy to move common files between office suites. It does not fix Access database relationships or replace Access for this task.

Frequently Asked Questions
Why does Access show the error when I click the subform?
Access normally tries to save the current parent record when you move into a subform. If the parent record cannot be saved or the child key does not match a parent key, a matching-record error can occur.
Where do I set the fields that link a form and subform?
Open the parent form in Design View, select the subform control, and open Property Sheet > Data. Use Link Master Fields for the parent key and Link Child Fields for the matching child foreign key.
Should the subform query join the parent table?
For this setup, use the child table or an appropriate child query as the subform's Record Source rather than joining it to the parent table. Let the subform control's link properties connect the records.
What field type should match an AutoNumber parent key?
The child foreign key is typically a Number field with Field Size set to Long Integer. Check the field properties in the child table's Design View.
Can WPS Office repair an Access relationship error?
No. Correct the record sources and link properties in Microsoft Access. WPS Spreadsheet can work with tabular data exported to formats such as XLSX, but it does not repair Access database relationships.




