Modifying a field in one table with data from another table

  • Thread starter Thread starter Iram
  • Start date Start date
I

Iram

Hello.

I have a table with inventory information that I need to update.
The table is called "tbl_Master"
In this table i have many fields but most importantly "Name" and "DeviceSN".
I have another table called "tbl_ExcelImport". I created this spreadsheet
when I walked around doing a physical walk through and gathered all of the
Serial Numbers and who they were assigned to.
I need to run an update query that will update the "tbl_Master" table's
"Name" field based upon the "Name" field in the "tbl_ExcelImport" field based
on matching Serial Numbers from both tables.

How can acheive this?

Your help is greatly appreciated.
Iram/mcp
 
Hi Iram,
create a query using both tables.
Create a join between tblMaster.SerialNumber and
tblExcelimport.SerialNumber.
Drag the Name field from tblMaster on to the query grid.
Change the query to an update query.
In the UpdateTo row, type [tbl_ExcelImport].[Name]
Click on Run to make the query run the update.

Replace SerialNumber with the real name of your serial number field, use
square brackets if there is a space in the name.

I am assuming that your "Name" field is not called Name.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Jeanette, Thank you!

It worked beautifully!

Thanks!
Iram


Jeanette Cunningham said:
Hi Iram,
create a query using both tables.
Create a join between tblMaster.SerialNumber and
tblExcelimport.SerialNumber.
Drag the Name field from tblMaster on to the query grid.
Change the query to an update query.
In the UpdateTo row, type [tbl_ExcelImport].[Name]
Click on Run to make the query run the update.

Replace SerialNumber with the real name of your serial number field, use
square brackets if there is a space in the name.

I am assuming that your "Name" field is not called Name.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Iram said:
Hello.

I have a table with inventory information that I need to update.
The table is called "tbl_Master"
In this table i have many fields but most importantly "Name" and
"DeviceSN".
I have another table called "tbl_ExcelImport". I created this spreadsheet
when I walked around doing a physical walk through and gathered all of the
Serial Numbers and who they were assigned to.
I need to run an update query that will update the "tbl_Master" table's
"Name" field based upon the "Name" field in the "tbl_ExcelImport" field
based
on matching Serial Numbers from both tables.

How can acheive this?

Your help is greatly appreciated.
Iram/mcp
 
Back
Top