Query to update customer info.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two tables:
* master customer table
* customer updates.

The Customer Updates table can link to the master customer table by the
unique CustomerID. The Customer Updates table contains updated info such as
new: ContactName, Telephone, Address.

How do I create a query that only updates the fields in those records in the
Master Customer Table that have a match in the Customer Updates table?
 
Create a query that includes both tables and join the tables on CustomerID.
This query will only include customers that are in both tables. Include the
fields in the Master Customer Table you want to update. You don't need to
include any fields from the Customer Updates table. Convert the query to an
update query.
If ContactName is one of the fields you want to update, put this expression
where it says update to:
[Customer Updates].ContactName
Do the same for the other fields you ant to update and then run your query.
 
Works perfectly!


PC Datasheet said:
Create a query that includes both tables and join the tables on CustomerID.
This query will only include customers that are in both tables. Include the
fields in the Master Customer Table you want to update. You don't need to
include any fields from the Customer Updates table. Convert the query to an
update query.
If ContactName is one of the fields you want to update, put this expression
where it says update to:
[Customer Updates].ContactName
Do the same for the other fields you ant to update and then run your query.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com





Bill_S said:
I have two tables:
* master customer table
* customer updates.

The Customer Updates table can link to the master customer table by the
unique CustomerID. The Customer Updates table contains updated info such as
new: ContactName, Telephone, Address.

How do I create a query that only updates the fields in those records in the
Master Customer Table that have a match in the Customer Updates table?
 
Back
Top