Others

How to Link Access Forms and Automatically Populate Contract IDs

Steve KSteve K Nov 3, 2026 868 views

Question details

The user needs to set up an Access form so that creating a new contract record from a proposal form automatically populates the related ProposalID foreign key.

How to Link Access Forms and Automatically Populate a Related Contract ID
Product
Microsoft Access
Device & OS
not provided
Scenario
Managing one-to-one relational data between proposals and contracts using Access forms.
Observed behavior
A new contract record needs to automatically inherit the primary key (ProposalID) from the active proposal form without requiring manual data entry.
Before you start

Verify that your tables (tblProposals and tblContracts) have a genuine one-to-one relationship defined in the Database Tools relationship window, and that referential integrity is enforced.

Solution 1Recommended

Use a Main Form with a Linked Subform

Placing the contract form as a subform inside the proposal form allows Access to automatically manage the foreign key relationship.

This approach leverages the Link Master Fields and Link Child Fields properties in Access. When these are properly configured, any new record created in the subform automatically inherits the ID of the current record displayed in the main form.

1
Open Main Form in Design View

Open your main proposal form in Design View by right-clicking it in the Navigation Pane and selecting 'Design View'.

2
Insert the Subform

Drag the tblContracts table or your contract form from the Navigation Pane directly onto the main form's design grid to create a subform control.

3
Configure Link Properties

Select the newly added subform control. Open the Property Sheet (F4), navigate to the 'Data' tab, and set both the 'Link Master Fields' and 'Link Child Fields' properties to 'ProposalID'.

4
Test the Data Entry

Switch back to Form View. When you begin typing data into the contract subform, the ProposalID will now automatically populate based on the currently active proposal.

Use a Main Form with a Linked Subform
Automatic Linking: By enforcing referential integrity in your database relationships, Access ensures no orphan contract records can be accidentally created without a valid proposal.
Free Microsoft Office alternative

Manage Your Data Easily with WPS Office

While Microsoft Access is used for complex relational databases, tracking lists, proposals, and contracts can often be handled more intuitively using a spreadsheet. WPS Office provides a lightweight, highly compatible, and free alternative to Microsoft Office, making data tracking simple and efficient without the steep learning curve of database management.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package.
  2. 2. Install the Software: Run the installer and follow the on-screen instructions to complete the setup.
  3. 3. Open WPS Spreadsheet: Launch WPS Office, open Spreadsheet, and easily import your existing data to start managing your proposals and contracts.
Free and lightweight alternative to Microsoft OfficeFully compatible with Microsoft Excel (.xlsx) formats for easy data migrationUse advanced functions like VLOOKUP to manage related data across different sheetsFamiliar tabbed interface with zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why is the related ID not populating in my subform automatically?

This usually occurs if the 'Link Master Fields' and 'Link Child Fields' properties on the subform control are blank or incorrectly configured. Ensure both are exactly set to your primary key, such as ProposalID, in the Property Sheet under the Data tab.

Can I use a command button to open a related form instead of using a subform?

Yes. You can add a Command Button to the main form, use the Button Wizard to select 'Form Operations' > 'Open Form', and choose the option to find specific data to display. This synchronizes the newly opened form to the ProposalID of the current record.

What does enforcing referential integrity mean in Access?

Enforcing referential integrity prevents orphaned records in your database. In this scenario, it ensures you cannot create or save a contract record unless it is linked to a valid, existing proposal record.