How to Update an Access Table with Customer IDs from Another Table
Question details
The user needs to update a local Microsoft Access table with Customer IDs from a linked table by matching customer codes.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Updating records in a local Access table based on data from a linked table, while restricting the operation to recent records.
- Observed behavior
- A need to execute an update query that successfully joins the local and linked tables, matching on a specific customer code field to populate the CustomerID.
Before running update or append queries, ensure you have a backup of your Microsoft Access database to prevent accidental data loss in case of a query mistake.
Use an Update Query with an Inner Join
Execute an SQL UPDATE statement that joins your local table with the linked table to correctly copy the CustomerID to existing records.
By utilizing an INNER JOIN in your SQL statement, you can match the unique CustomerCode between your local table and the linked table. You can also apply a date filter in the WHERE clause so that only recent records are updated, optimizing processing time.
Launch Microsoft Access, open your database, and go to the 'Create' tab on the ribbon. Click on 'Query Design'.
Close the 'Show Table' dialog box that appears. Right-click the query tab or use the Design ribbon to switch to 'SQL View'.
Type the update query syntax. For example: UPDATE tblBids INNER JOIN dbo_tblCustomer ON tblBids.Chempax = dbo_tblCustomer.CustomerCode SET tblBids.CustomerID = dbo_tblCustomer.CustomerID WHERE tblBids.CreationDate >= #1/1/2020#;
Click the 'Run' button (the red exclamation mark icon) in the Design tab to execute the query and update your records.

Use an Append Query for Genuinely New Records
If you need to add completely new records rather than updating existing ones, use an INSERT INTO append query.
Need a Free Alternative for Your Daily Office Tasks?
While Microsoft Access is a specialized database tool, you likely need software for everyday document creation, spreadsheets, and presentations. WPS Office is a free, lightweight alternative that offers robust features without the heavy subscription fees.
- 1. Visit the WPS Website: Navigate to the official WPS Office website using your web browser.
- 2. Download the Installer: Click the 'Free Download' button to download the appropriate installer for your operating system.
- 3. Install the Software: Open the downloaded file and follow the simple on-screen instructions to complete the installation.
- 4. Start Creating: Launch WPS Office to instantly start managing your documents, spreadsheets, and presentations.

Frequently Asked Questions
Why should I use CustomerID instead of CustomerCode as a relational key?
CustomerID is typically an AutoNumber primary key, which is highly optimized for database relationships, indexing, and joins. CustomerCode is a human-readable unique value best used in forms and reports rather than as the primary relational key.
Can I use an append query and an update query together?
Yes, they serve different purposes but can be used sequentially. Use an append query (INSERT INTO) to add brand new records to your table, and an update query (UPDATE) to modify existing records or fill in missing relational data like the CustomerID.
How do I limit my Access query to only process recent records?
You can limit the processed records by adding a WHERE clause with a date condition. For example, using 'WHERE CreationDate >= #1/1/2020#' surrounded by hash symbols (#) ensures the query only affects records created on or after January 1, 2020.




