Help with Update Query

  • Thread starter Thread starter Jools
  • Start date Start date
J

Jools

Guest
I am trying to update a collumn in one table with data from a collumn in another table. I have linked the 2 tables by the product id. Table one has thousands of lines, but table 2 has a few hundred with a code (A-E) in the last collumn.

What i need is to run a query to update the Code collumn in table 1 with the codes for the product id's that are in table 2.

I've had no luck so far.

HELP!

Thanks in advance.
 
What have you tried to use for criteria so far? How is your current Update Query designed?
 
Pretend your setup is like the following:

tblJools-01
ID
txtCode

tblJools-02
ID
txtCode

Relationship made between the tables with ID field.

the update query would show both tables and use only one column.
Field: txtCode
Table: tblJools-01
Update To: [tblJools-02]![txtCode]
 
Well doing this from memory as i'm at home now but i have the 2 tables joined by product id. Then i have the 'code' from the 2nd table (the one i'm updating from) down in the bottom half of the query window. It is updating to the 'code' collumn in table 1.

I have no criteria as i want every entry in table 2 updating to table 1.

I should be updating 500 entries as that is how many are in table 2, but it comes back with thousands instead of 500. And does update what should be updated.

Hopefully i'm doing something really basic wrong but i dunno?
 
You beat my reply.

But anyways, your's looks like what i've done already and it doesn't seem to work. I'll double check tomorrow but i'm 99% sure the queries are the same.
 
Sorry, After I posted my first response I noticed I didn't need any response. :o :p You are correct about the criteria, not needed.

My second response should do it. :D
 
Jools said:
You beat my reply.

But anyways, your's looks like what i've done already and it doesn't seem to work. I'll double check tomorrow but i'm 99% sure the queries are the same.

LOL. Did it again. Oops! Double-check and get back to us. If it doesn't fix it, I can either post an example database or you can post what you have and we can go from there.
 

Users who are viewing this thread

Back
Top Bottom