Others

How to Append Access Records When Source and Destination Keys Differ

Chanuka GeekiyanageChanuka Geekiyanage Nov 3, 2026 869 views

Question details

The user needs to append booking information to another table upon confirmation, but the source and destination tables use different primary keys, and confirmed costs may differ from quoted costs.

How to Append Access Records When Source and Destination Keys Differ
Product
Microsoft Access
Device & OS
not provided
Scenario
Transferring or appending confirmed booking records to a new table where the actual costs differ from the initial quoted costs, complicating the primary key matching.
Observed behavior
Attempting to append records with differing primary keys leads to complex workarounds like inserting dummy values or duplicating unchanged data across tables.
Before you start

Map out the relationships between your source and destination tables on paper. Identify which fields are unique to the confirmed booking (such as actual cost) and which fields remain unchanged (such as customer details).

Solution 1Recommended

Create a Related Table with a Foreign Key

Instead of duplicating the entire source table, create a new table specifically for the confirmed data and link it using a foreign key.

In a relational database, duplicating data across multiple tables violates normalization principles and can lead to inconsistencies. By creating a separate table for the confirmed booking details, you can track changes efficiently without redundant data.

1
Create a new table

Open Microsoft Access, go to the Create tab, and select Table Design. Create a new table specifically for confirmed or actual costs.

2
Assign a new Primary Key

Add a new field (e.g., ConfirmedCostID) and set its Data Type to AutoNumber. Right-click the field name and select Primary Key.

3
Add a Foreign Key

Add a field that matches the Primary Key of your original booking table (e.g., BookingID) and set it to the appropriate Number data type. This will act as your Foreign Key.

4
Add required data fields

Add fields for the data that differs upon confirmation, such as ActualCost (Currency type) and DateEntered (Date/Time type).

5
Establish the relationship

Go to Database Tools > Relationships. Drag the Primary Key from your original table to the Foreign Key in your new table to enforce referential integrity.

Create a Related Table with a Foreign Key
Relational Data Retrieval: Once the relationship is established, you can use queries to easily retrieve the unchanged information (like room name and sleep type) from the original table alongside the actual costs from the new table.
Free Microsoft Office alternative

Manage Data Easily with WPS Office

While Microsoft Access is a powerful tool for complex relational databases, many users find that managing flat-file data, tracking costs, and generating reports is much easier in spreadsheet software. WPS Office is a free, lightweight suite that offers robust spreadsheet capabilities and is fully compatible with Microsoft Office formats.

  1. 1. Visit the WPS website: Go to the official WPS Office website to download the latest version.
  2. 2. Download the installer: Click the 'Download WPS Office Free' button and save the installer file to your computer.
  3. 3. Install and manage data: Run the installer, open WPS Spreadsheet, and start organizing your tabular data effortlessly.
Free and lightweight alternative to Microsoft OfficeFully compatible with Excel (.xlsx), Word (.docx), and PowerPoint formatsFamiliar user interface for seamless migration and zero learning curveEasily manage data tables, track costs, and filter records in WPS SpreadsheetBuilt-in PDF tools for easy document sharing and reporting
microsoft office alternative - wps office

Frequently Asked Questions

Why shouldn't I just duplicate the entire source table in Access?

Duplicating the entire source table creates redundant data. If customer details change, you would have to update them in multiple places. It is better to use relationships and foreign keys to reference unchanged data.

What is a foreign key in a Microsoft Access database?

A foreign key is a field in one table that uniquely identifies a row of another table. It matches the primary key of the related table, allowing Access to cross-reference data and maintain referential integrity.

Can I use an Append Query if the primary keys between tables don't match?

Yes, but you must map the fields carefully in the query design grid. If the destination table uses an AutoNumber primary key, you should exclude that field from the Append Query so Access automatically generates a new ID for the incoming records.