How to Create an Access Form with Two Related Subforms and a Combo Box
Question details
The user needs to build a database form that allows selecting a specific parent record via a search dropdown and entering related child records into two separate subforms.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Creating a relational database interface to track distinct types of records (such as planting and harvesting dates) linked to a main entity (like fruits) without losing historical data.
- Observed behavior
- The goal is to implement an unbound search combo box that successfully links a main form to two corresponding subforms without overwriting the primary key when a user makes a selection.
Ensure your database already contains the three necessary tables (e.g., Fruits, Plantings, and Harvests) with properly defined primary keys and related foreign keys before assembling the form.
Create the Bound Main Form and Relational Subforms
Establish the core layout by linking the parent table to the two child tables using master and child fields.
To properly display related data, the main form must be bound to the primary table, while the subforms are bound to the related tracking tables. This prevents duplicate entries and ensures historical records are tied to the correct parent entity.
Navigate to the Create tab, click Form Design, and bind the form to your primary table (e.g., Fruits) using the Record Source property.
From the Design tab, drag two Subform/Subreport controls onto your main form and bind them to your secondary tables (e.g., Plantings and Harvests).
Select each subform control, open the Property Sheet, and map the LinkMasterFields (main form primary key) to the LinkChildFields (subform foreign key).

Add an Unbound Search Combo Box
Implement a combo box to quickly navigate to specific records on the main form without accidentally overwriting the primary key data.
Manage Tabular Data Easily with WPS Spreadsheet
While Microsoft Access is built for complex relational databases, many users find that organizing lists and tracking tabular data is faster and more intuitive in a powerful spreadsheet. WPS Office provides a free, highly compatible alternative for managing linked records, using lookup formulas, and creating dependent dropdown lists without writing complex database macros.
- 1. Download and Install: Visit the official WPS Office website to download the free suite onto your computer.
- 2. Open WPS Spreadsheet: Launch WPS Spreadsheet and create a new workbook or import your existing data.
- 3. Set Up Data Validation: Use the Data Validation tool to create intuitive dropdown menus that link your primary records to tracking sheets without writing code.

Frequently Asked Questions
Why does selecting a value in my combo box overwrite my existing primary key?
This occurs if your combo box is bound to the primary key field. To fix this, open the combo box's Property Sheet and clear the 'Control Source' field so it becomes an unbound search control.
How do I stop users from typing random entries into the search combo box?
Open the Property Sheet for your combo box, navigate to the Data tab, and set the 'Limit To List' property to 'Yes'. This forces users to only select existing records.
What is the difference between LinkMasterFields and LinkChildFields in a subform?
LinkMasterFields refers to the primary key field on your main form. LinkChildFields refers to the corresponding foreign key field in the subform's underlying table. Connecting these keeps your main and subform records synchronized.
Can I use VBA to handle the combo box search instead of the macro wizard?
Yes. An unbound combo box typically uses an AfterUpdate VBA event that searches the form's RecordsetClone for the selected key, and then sets the form's Bookmark property to match the found record's bookmark.




