PC Review


Reply
Thread Tools Rate Thread

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

 
 
Chrisso
Guest
Posts: n/a
 
      6th Nov 2007
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

 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      6th Nov 2007
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)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Chrisso" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Chrisso
Guest
Posts: n/a
 
      8th Nov 2007
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




 
Reply With Quote
 
phillipo
Guest
Posts: n/a
 
      9th Nov 2007

"Chrisso" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make an update query to update fields in one table with fields from another table? Chrisso Microsoft Access Queries 1 6th Nov 2007 12:27 PM
Update Fields If FROM Table Fields Are NOT NULL Handyman Microsoft Access Queries 2 13th Sep 2007 05:54 AM
Update all fields from 1 table to another table =?Utf-8?B?TGVvbmFyZA==?= Microsoft Access VBA Modules 6 23rd Mar 2007 07:14 PM
HELP: Update 1 table with calculated fields from another table =?Utf-8?B?U2Ftb3Jh?= Microsoft Access Queries 0 23rd May 2004 05:16 PM
How to update values in fields from one table to same fields in another Table Microsoft Access 1 7th Jan 2004 10:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:13 AM.