ACC: Updating a Table from a Second Table Using an ExpressionID: Q103269
|
Novice: Requires knowledge of the user interface on single- user computers.
This article describes how to create a query that uses an expression to
update a record in one table with data from another table.
The sample query below adds data from the Current Week table to the
records in the Yearly Rainfall table.
NOTE: This type of query does not work if the data being added is the
result of a totaling or grouping.
City Inches Last Updated
-------------------------------
Baroda 0.5 4/2/93
Basildon 22.0 4/2/93
Beaver 18.0 4/2/93
City Inches Week Of
--------------------------
Baroda 0.1 4/9/93
Basildon 2.0 4/9/93
Beaver 2.5 4/9/93
Field: Last Updated
Table: Yearly Rainfall
Update To: [Current Week].[Week Of]
Field: Inches
Table: Yearly Rainfall
Update To: [Yearly Rainfall].[Inches]+[Current Week].[Inches]
The data in the table Yearly Rainfall is now:
City Inches Last Updated
---------------------------------
Baroda 0.6 4/9/93
Basildon 24.0 4/9/93
Beaver 20.5 4/9/93
For more information about update queries, search the Help Index for "update queries," or ask the Microsoft Access 97 Office Assistant.
Additional query words: total archive history
Keywords : QryMktbl
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: March 26, 1999