Can somebody help me? We are tasked to create a library system. And my very first problem is how to create a search engine. The form must be like this:

1.) One search engine for the Title of the book, wherein the user can search through the title of books.
2.) Other search engine for the ISBN.(or the code for every book)
3.) Category: (Love story, Horror, Mathematic, English and etc.)
4.)Author

All the information of the books are already stored in the database, so I guess, the search code must refer to the stored information of books in the database.


Please reply! I really need this for my finals....


here's my mobile number: 09303413211
Your help is highly acknowledge...

You have not shown us any effort from your side, please read our posting rules.

To answer your question, use the "WHERE" clause in your "SELECT" statement -

rsBooks.Open "SELECT * FROM MyBooks WHERE Title =" & "'" & strTitle & "'", cnMyBooks, AdOpenStatic, AdLockOptimistic

'strTitle is the actual typed in search criteria.

Use the same for all your scenarios above.

@psychra:

list those search categories in a combobox...then when the user clicks the search button...perform the search for the selected category...

then open a recordset query..something like what AndreRet posted above...

performing searches in your database, all you just need is to do a select query...and then put some conditions if needed...you don't need to write bunch of codes for that...

SELECT * FROM tblTitle WHERE BookTitle = '<your search here>'"

it is the same with other categories...

if you need more clarifications, and if I have my free time, I could make an example...but for the meantime...this is just for now...

Filipino?

This article has been dead for over six months. Start a new discussion instead.