Search Query Help!

cratediggah

New member
Local time
Today, 16:32
Joined
Feb 9, 2004
Messages
7
Hi all,

Pretty simple question I think, I have built a bibliography database for my professor. She would like to be able to do a keyword search on field (author name, book / journal name, keyword, etc.) Is this possible? I have included a copy of my database. The search form is: Book Search. Any help would be appreciated, thanks!
 
Last edited:
Many to Many

Have a look at this example, you should be able to adapt it to do what you want.


Build Your Query : Form based Selection Criteria for queries by Nirmala Sekhar

http://www.saicomsystems.com/AccessPearls/que-01.asp


I noticed that you have one table which has fields for Author 1 Author 2 etc. This is not a good idea as it will be difficult to search for all the books by a particular Author. It also causes a lot of wasted space in your data, not such a problem these days with our large hard drives, but isn’t considered good practice. What you really need to do is put the Authors in a separate table, and then make another table to store the book ID. and the Author ID. this gives you the facility of a many to many join. So You have three tables :

tblBook
tblAuthor
tblBookAuthor

The book table would look something like this :

BookID >>> BookTitle
1 >>>>>>>> Love Triangle
2 >>>>>>>> Love Square Dancing
3 >>>>>>>> Love the Pentagon

The Author table would look something like this:

Author ID >>> Author
1 >>>>>>>> Tony Hine
2 >>>>>>>> Tony Blair
3 >>>>>>>> GW Bush

If the many to many link table would look like this :

BookID >>> AuthorID
1 >>>>>>>> 1
2 >>>>>>>> 2
3 >>>>>>>> 3
And if the book had two Author’s you would have another entry :
3 >>>>>>>> 2

Now if you did a search to find all the books by Tony Blair (2) you would find that he was an Author of Love Square Dancing (2) and Love the Pentagon (3)
 
Last edited:
Thanks for all of your help, but I am still having some major problems. My prof. is all over me to finish this, can anyone please take a look? The search function is still not working, I've spent HOURS trying to figure this out! Thanks!
 
Last edited:

Users who are viewing this thread

Back
Top Bottom