I'm building a database of "actors_directors" who are renting "books" from my library – a kind of exercise to learn database basics 🙂
This is how my "actors_directors" table looks like. They are the customers who are renting the books from my library. Index field is a primary key in this table.
There are books listed in different table called "books" and similarly "Index" field is a primary key in this table.
Finally I have all the instances of the book being rented in my third table "checkouts". Please ignore the last three columns there. Similarly "Index" field is a primary key in this table.
"ForeignKeyCustomer" column refers to Index column in "actors_directors" table and its one-to-many relationship.
"ForeignKeyBook" column refers to Index column in "books" table and its one-to-many relationship.
These are relationship I've set for my tables.
Now after I unfold the pluses in the "actors_directors" table like it's shown in the next picture, there are not exactly the info I wanted to see.
What I see is the number of the book, some specific actor rented, while I'd like to see the title of this book.
Instead of info about "ForeignKeyBook" – the book's number, I'd like to see it's Title in this place. But the info about the title is in different table. Can U help me with that?
I don't want to see the book's number, because it tells me nothing.
I want to see the book's title, that is in different table, but also the "CheckOutDate" and "RentPeriod" and "RentFee" from this "checkouts" table, that's related/linked in my current situation (this screenshot).
Thanks in advance my friends.
Best Answer
You can make foreignKeyBook field as a compobox with coulumn count = 2, column widths =0"1", and row source is a query of books.index and books.title in that order
Or you could easily make this in the beginning while designing the checkout table by setting the data type of field ForeignKeyBook to lookup withered.. and following the lookup wizard window