update multiple fields in a record based on a record in another table

B

bertil.hedenstrom

Hi there,

I know it is possible to create an update query to update one value in
one table based on the value from another table.

But it seems it doesn't work if you wnat to update multiple values.

My goal is to update multiple fields in one record of TABLE2 with
values of fields in one record of TABLE1.

Is it possible with a single query ?

When I try to do it as stated in Access help, I get a prompt to enter a
parameter for my query.

Tanks in advance

Bertil
 
D

David Cox

You have probably misspelt the field name so that it is being treated as a
parameter, or else the query does not provide a link to the table that the
field is in.
 
B

bertil.hedenstrom

David,

Thanks for your answer. However, I had double checked the table and
field names. I will do that again and let you know.

Regards

Bertil


David Cox a écrit :
 
D

David Cox

I just tried this and it worked:

UPDATE Table2 INNER JOIN Table3 ON Table2.ID = Table3.ID SET Table2.Field1 =
[table3].[field1], Table2.Field2 = [table3].[field2];

so it is possible to update multiple fields.


David,

Thanks for your answer. However, I had double checked the table and
field names. I will do that again and let you know.

Regards

Bertil


David Cox a écrit :
 

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