update query two identical tables one to one relationship

HELP! I'm trying to restore data that was inadvertently deleted from a table with data from a backup table. I need to update the fields in tblBooks1 with the data in the fields in tblBooksonly284 for all records in tblBooksonly284.

I tried this query, but am getting pop-ups that are asking for parameter values for all tblBooksonly284 fields.

I tried earlier but negleted to add the WHERE clause, and it deleted ALL data from all of these fields,  I had backed up the data, so am trying again.

What am I doing wrong?  
The identical field is an autonumber field.  Hopefully it's possible to join those fields.

UPDATE tblBooks1 SET tblBooks1.YrWritten = tblBooksonly284!YrWritten, tblBooks1.NoPages = tblBooksonly284!NoPages, tblBooks1.Summary = tblBooksonly284!Summary, tblBooks1.GenreID = tblBooksonly284!GenreID, tblBooks1.[Film Title] = tblBooksonly284!FilmTitle, tblBooks1.FilmDate = tblBooksonly284!FilmDate, tblBooks1.FilmDetails = tblBooksonly284!FilmDetails, tblBooks1.Subjects = tblBooksonly284!Subjects
WHERE tblBooks1.BookID  = tblBooksonly284.BookID;

Thanks.
schneider_ksAsked:
Who is Participating?
 
PaulstottConnect With a Mentor Commented:
Try

UPDATE tblbooks1 INNER JOIN tblbooksonly284 ON tblbooks1.bookID = tblbooksonly284.bookID SET tblbooks1.yrwritten = tblbooksonly284.yrwritten, tblbooks1.nopages = tblbooksonly284.nopages, tblbooks1.summary = [tblbooksonly284].[summary] ......... etc
0
 
schneider_ksAuthor Commented:
PS, I should add that the tblBooks1 has 1200 records, and the tblBooksonly284 has only 284 records.  The rest of the records were inadvertently deleted.
0
 
Arthur_WoodCommented:
or:

UPDATE tblBooks1,tblBooksonly284  SET tblBooks1.YrWritten = tblBooksonly284!YrWritten, tblBooks1.NoPages = tblBooksonly284!NoPages, tblBooks1.Summary = tblBooksonly284!Summary, tblBooks1.GenreID = tblBooksonly284!GenreID, tblBooks1.[Film Title] = tblBooksonly284!FilmTitle, tblBooks1.FilmDate = tblBooksonly284!FilmDate, tblBooks1.FilmDetails = tblBooksonly284!FilmDetails, tblBooks1.Subjects = tblBooksonly284!Subjects
WHERE tblBooks1.BookID  = tblBooksonly284.BookID;


AW
0
 
schneider_ksAuthor Commented:
Excellent.  Problem Solved.  Thanks for the quick fix
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.