Modifying a field in one table with data from another table

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
 
J

Jeanette Cunningham

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
 
I

Iram

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top