Others

Relate Imported Excel Data to an Access Contacts Table

Camila MilosovichCamila Milosovich Nov 18, 2026 869 views

Question details

Connect imported Excel teaching records to the correct contacts in Microsoft Access.

How to Relate Imported Excel Data to an Access Contacts Table
Product
Microsoft Access and Microsoft Excel
Device & OS
not provided
Scenario
An Excel worksheet lists instructors and the units they teach, while an Access table stores their contact records.
Observed behavior
Each teaching record should reference a unique contact ID so a query can display the units taught by each instructor.
Before you start

Check whether the Excel worksheet and Contacts table share a unique employee or instructor identifier. If they do not, identify additional information you can use to verify matches, because names alone may not be unique.

Solution 1Recommended

Import the Excel data and link teaching records by contact ID

Use this approach to create a reliable one-to-many relationship between contacts and their teaching records.

1
Check the contacts key

Open the Contacts table in Design View and confirm that ContactID is its primary key. If no suitable unique key exists, add a ContactID field with the AutoNumber data type, select the field, and click Primary Key.

2
Import the worksheet

In Access, select External Data > New Data Source > From File > Excel. Choose the workbook and import the worksheet into a new temporary table, using the first row as column headings if it contains field names.

3
Create a teaching records table

Select Create > Table Design and create a UnitsTaught table with its own primary key, a ContactID foreign-key field, and the unit information you need. If Contacts.ContactID is an AutoNumber field, set UnitsTaught.ContactID to Number with Field Size set to Long Integer.

4
Match and append the records

Use Create > Query Design to match the temporary table to Contacts by a shared unique identifier. If no identifier is shared, build a mapping table from the source instructor identifier to ContactID and verify ambiguous or unmatched records manually. Create an Append query to add each verified ContactID and unit record to UnitsTaught.

5
Create the relationship

Open Database Tools > Relationships, add Contacts and UnitsTaught, and drag Contacts.ContactID onto UnitsTaught.ContactID. Select Enforce Referential Integrity and click Create.

6
Display instructors and units

Select Create > Query Design, add Contacts and UnitsTaught, and include the contact name and unit fields. Run the query to display each instructor's teaching records.

Verify instructor matches: Do not assign records based on a name alone when it could refer to more than one person. Resolve uncertain matches before appending records to UnitsTaught.
Free Microsoft Office alternative

Prepare Excel Teaching Data with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for reviewing and organizing spreadsheet data before importing it into Access. Its Excel format support helps you move existing worksheets without starting over. Access is still needed to create and enforce the database relationship.

Review instructor identifiers and unit columns before an Access import.Open and edit Microsoft Excel XLS and XLSX files.Use a familiar spreadsheet interface to work with existing files.Get a free, lightweight office suite for everyday document work.
microsoft office alternative - wps office

Frequently Asked Questions

Why shouldn't I relate the tables using instructor names?

Names can be duplicated or changed, which can link a teaching record to the wrong contact. Use a unique ContactID or EmployeeID as the primary key in Contacts and store that ID as a foreign key in UnitsTaught.

What if the Excel file does not contain a contact ID?

Import it into a temporary table using External Data > New Data Source > From File > Excel. Create a mapping from each source instructor identifier to the correct ContactID, and manually verify ambiguous or unmatched records before appending them.

What data type should the foreign key use?

It must be compatible with the Contacts primary key. If ContactID is an AutoNumber field, set the related ContactID field in UnitsTaught to Number with Field Size set to Long Integer.

How do I show the units taught by each instructor?

Select Create > Query Design, add the related Contacts and UnitsTaught tables, and add the contact name and unit fields to the query grid. Run the query to see the matching records.

Can WPS Office create the Access relationship?

WPS Spreadsheets can help you review and edit the Excel source file, but it does not create or enforce Microsoft Access table relationships. Use Database Tools > Relationships in Access for that step.