How can I update fields in one table with fields in another table?

C

Chrisso

Hi All

I have two tables: my main table and a cut-down version of the main
table with newly updated values:

Main
-------
RefNo
Document_Type
Version
Title

ModMain
-------------
RefNo
Document_Type_UPDATED
Version_UPDATED
Title_UPDATED

I can't work how to use Access's query builder to do the simple task
of
updating the fields in "Main" with the modified values in "ModMain"
where the RefNos match.

Can anyone give me a pointer or web link? I cant find any information
in Access Help about performing update queries with more than one
table. This seems a straight forward action!

Chrisso
 
D

Douglas J. Steele

I won't ask why you want to store the data redundantly...

In the query builder, add the two tables Main and ModMain. If there isn't
already a relationship between the two tables, drag the RefNo field from one
of the tables and drop it on the RefNo field of the other table.

Add the three other fields from table Main to the grid and convert the query
to an Update query (there's a button on the button bar, or you can go to the
Query menu while the query's open in Design view).

Underneath the Document_Type field in the grid, put
[ModMain].[Document_Type_UPDATED] in the "Update To:" row. Do the same for
the other two field (putting, of course, the appropriate field underneath)
 
C

Chrisso

Thanks Doug.

FYI - once I have performed the update I will remove ModMain. It was
necessary to come up with the modifications off line.

Chrisso
 
P

phillipo

Chrisso said:
Thanks Doug.

FYI - once I have performed the update I will remove ModMain. It was
necessary to come up with the modifications off line.

Chrisso
 

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