I am building a personal library database. Some books have multiple authors. How can I display multiple authors for one book using a Combobox on a form?
Combo Box is not ideal for this purpose, use List Box or Sub form instead:
Subforms
Kevin Yip
@Reply 2 years ago
This needs to be set up correctly at the table-design level before you can do anything efficiently in forms. Suppose your books table and authors table look like this:
BookID BookTitle
1 Access 97 Developer's Handbook
2 A Brief Welcome to the Universe
AuthorID AuthorName
1 Paul Litwin
2 Ken Getz
3 Mike Gilbert
4 Michael A. Strauss
5 J. Richard Gott
6 Neil deGrasse Tyson
Then you can set up what is usually called a "junction table" that links the books to the authors:
BookID AuthorID
1 1
1 2
1 3
2 4
2 5
2 6
The above means book 1 is written by authors 1, 2, and 3, and book 2 by authors 4, 5, and 6.
Kevin Yip
@Reply 2 years ago
Kevin Yip
@Reply 2 years ago
When books are sorted by author, the author who is listed first is used for sorting. At least that is how libraries do it. So you need to keep this in mind if you do sorting in your database. As the above picture shows, "Access 97" would be sorted under "Litwin, Paul," and the other book under "Tyson, Neil deGrasse."
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visitor Forum.