This chapter finally adds what many consider to be the heart of a library system: the lookup of books and other library items by patrons.
Load the Chapter 17 (Before) Code project, either through the New Project templates or by accessing the project directly from the installation directory. To see the code in its final form, load Chapter 17 (After) Code instead.
When we built the main Library form back in Chapter 7, we included fields that allowed a patron to search for library items. But that's about all we did; we didn't enable the fields or make them usable. We also didn't include any place to display a list of matching items. Let's complete those components in this chapter. We'll start with the matching items list.
I've added a form to the project named ItemLookup.vb that displays the results of a search for library items. It includes a few buttons at the top of the form, and three main display panels:
Contains a large listbox that displays non-item matches. For instance, it displays a list of matching author or publisher names as searched for by the patron. When this panel appears, the patron selects a match from the
MatchingGeneral list, and clicks the Lookup button to display items tied to that selected author, publisher, or other entry.
Contains a large listbox that displays items from the
NamedItem database table. That is, it displays a list of library items matching some criteria. Selecting an item from the ...