Why did you delete the relationship to delete records???
OK, the error message means you have records in tblBooksAuthors where the AuthorID_FK is not in Author.Author_ID_PK. Because you are trying to set Referential Integrity, the values in "tblBooksAuthors.AuthorID_FK" MUST be in the table "Authors.Author_ID_PK" (the PK/FK relationship).
---------------------------------------------------------------
One method
To see which record(s) need to be deleted in "tblBooksAuthors", create a query using this SQL (switch to SQL View):
Code:
SELECT tblBooksAuthors.AuthorID_FK AS BooksAuthor, Authors.Author_ID_PK AS Author
FROM Authors RIGHT JOIN tblBooksAuthors ON Authors.Author_ID_PK = tblBooksAuthors.AuthorID_FK
ORDER BY tblBooksAuthors.AuthorID_FK;
When you execute this query, any blanks/Nulls in the "Authors" column means you have to delete those records in the "tblBooksAuthors" table.
From "tblBooksAuthors", you will need to delete the records where AuthorID_FK is 22, 23, 33 and 34.
Now do the same thing for "tblBooksAuthors" and "tblBooks". The query is
Code:
SELECT tblBooksAuthors.BookID_FK AS BooksAuthors, tblBooks.Book_ID AS Books
FROM tblBooks RIGHT JOIN tblBooksAuthors ON tblBooks.Book_ID = tblBooksAuthors.BookID_FK
ORDER BY tblBooksAuthors.BookID_FK;
When you execute this query, any blanks/Nulls in the "tblBooks" column means you have to delete that record in the "tblBooksAuthors" table.
From "tblBooksAuthors", you will need to delete the delete the record where BookID_FK is 29.
---------------------------------------------------------
The other method is to delete ALL records from "tblBooksAuthors", re-link the tables and re-enter the records in "tblBooksAuthors".
----EDIT: The two queries (above) are only temporary queries. You can delete the two queries after you get the tables re-linked.