Update query - need to update recid from 1 table into another

Having brain freeze.  what is the proper syntax to update 1 recid field  from another.

Table names tblcity.staterecid.
tblStateIDUpdate.staterecid.

I need to update the city table list of state id with those from the tblStateIDUpdatetable...

SELECT tblStateIDUpdate.[StateRecID], tblStateIDUpdate.[City], tblStateIDUpdate.[StateCode], tblStateIDUpdate.[StateName], tblStateIDUpdate.[CountryCode], tblStateIDUpdate.[CountryName]
FROM tblStateIDUpdate;

Open in new window


SELECT tblCity.CityRecID, tblCity.CountryRecID, tblCity.StateRecID, tblCity.CityName, tblCity.TaxInclusive, tblCity.Top5000, tblCity.DateCreated, tblCity.DateModified, tblCity.ModifiedBy
FROM tblCity;

Open in new window


Easy 500 points.

K
Karen SchaeferBI ANALYSTAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PatHartmanCommented:
You need to join the two tables.
Open the QBE.
Drag in the table you want to update.
Drag in the table with the data you need.
Draw a join line between the two tables on the PK to FK.
Change the query type to Update
Select the column you want to update.
In the Update To line, type in the tablename.column name with the replacement data.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Karen SchaeferBI ANALYSTAuthor Commented:
thats what I did and got error not updatable.
Karen SchaeferBI ANALYSTAuthor Commented:
thanks I got it to work.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.