See direct (instead of indirect) info about rented book in my “actors_directors” talbe dropdown list - Access365

dba.stackexchange https://dba.stackexchange.com/questions/253115

Question

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.

This is how my "actors_directors" table looks like.

There are books listed in different table called "books" and similarly "Index" field is a primary key in this table.

This is how my "books" table looks like.

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.

This is how my "checkouts" table looks like.

These are relationship I've set for my tables. This is how actors_directors with checkouts table relationship looks like.

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.

05 - actors_directors relations but not what I wanted

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).

06 - how to add book's title to all these info, without deleting the info sourced from "checkouts" table?

Thanks in advance my friends.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top