Others

How to Create an Access Form with Two Related Subforms and a Combo Box

Elise WilliamsElise Williams Oct 29, 2026 869 views

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.

How to Create an Access Form with Two Related Subforms and a Combo Box
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.
Before you start

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.

Solution 1Recommended

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.

1
Create the Main Form

Navigate to the Create tab, click Form Design, and bind the form to your primary table (e.g., Fruits) using the Record Source property.

2
Insert Subform Controls

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).

3
Configure Master and Child Links

Select each subform control, open the Property Sheet, and map the LinkMasterFields (main form primary key) to the LinkChildFields (subform foreign key).

Create the Bound Main Form and Relational Subforms
Data Integrity: Linking these fields correctly ensures that any new record added inside the subforms automatically inherits the primary key of the currently selected parent record.
Free Microsoft Office alternative

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. 1. Download and Install: Visit the official WPS Office website to download the free suite onto your computer.
  2. 2. Open WPS Spreadsheet: Launch WPS Spreadsheet and create a new workbook or import your existing data.
  3. 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.
Seamlessly compatible with Microsoft Excel (.xlsx and .xls) formats for straightforward data migration.Free and lightweight, avoiding the steep learning curve of relational database software.Create functional relational lookups quickly using Data Validation and XLOOKUP formulas.Familiar ribbon interface ensures an effortless transition from other Office suites.
microsoft office alternative - wps office

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.