Join David Rivers for an in-depth discussion in this video Finding records in a form, part of OpenOffice.org 2 Base Getting Started.
As we have learned in the previous lesson creating a form in OpenOffice Base is an excellent way for inputting data. It will allows you to stay organized and ensure that the right data is going into the right tables in your database but when you setup a form you also have the ability to set it up so that records can be viewed. So in this lesson we are going to be talk about viewing records and finding specific records. When you begin to accumulate hundreds or even thousands of records using a form to navigate from record to record can be very tedious. Using some search functionality will definitely help.
So we are going to continue to use our DVD- Collection database here from the previous lesson. If you jumped to this lesson and you have got the exercise files, you can get all by going to the lesson 3 folder and opening up DVD collection3. Make sure Forms is selected, DVD-Collection. You will see the preview over here so long as Document is selected from the dropdown and we are going to go in here as if we were inputting some additional records. So let's double click DVD-Collection. Now this is going to open up another window. I am going to maximize it just by double clicking up here in the title bar. There we go. That allows me to see the full record as well as down at the bottom I got some navigation buttons. So I can move through the records using the Next Record, the Previous Record buttons. I can go to the beginning or the end, even create new records from down below. Now I want you to imagine for a moment here you have got 100s of records and you want to locate a specific movie or maybe a subject, a director for example. Well on that case, you might want to go all the way over here to the left hand side and use the binoculars, which is the Find Record tool. It's a little bit different from the binoculars you see up here on your Standard toolbar. Way up here at the top is the Find and Replace function. So if you want to find something and replace it with something else that's a good tool, but if you are simply looking for records this is the one you want to use down here in the bottom left corner. I am going to give it a click now to launch the Record Search dialog box. And I have got many options here for locating a specific record. All right let's say I was looking for the Jurassic Park movie.
Well you can see I have got sections here in this dialog, the search for section where to search, and settings, and start at the top. I have got three options. I can search for specific text just by typing it in. If I want to find empty fields, here is the fast way to do that. I kind of like this because if you want to fill in fields that may have been left empty on purpose or by accident this will locate all those fields, field content is NULL, that's what empty is and once you get to those records in those fields you just simply fill in the information by typing. The opposite of that is field content that is not NULL or empty. So you got those two options here but we are looking for text.
So I am going to just type in Jurassic just like so and I am going to make sure I spell it right. So I am going to take out that extra a. There we go. Now down below where am I going to searc. Do I want to search through all the fields? If I click this radial button, it will search every field. Now I am pretty sure that this is only going to show up in the actual Movie Title itself. So I am going to choose single field and this will speed up the search because it's not going to have to search through every field, click the dropdown and there are my fields to choose from. Look at that. Movie Title right there, I give it a click and it's selected. Now down below I have got some settings as well.
For example anywhere in the field if I click this dropdown at the beginning the end or the entire field, I am going to just leave it at anywhere in the field because a Movie Title may have several words in it. I want to make sure it finds Jurassic in that field anywhere. Now do I want to apply the field format match case? So if I was typing in Jurassic with a capital J, I would want match case. In this case I just typed it all in lower case, so matching case is not an option. Do I want to search backwards or forwards? If I am at the end of my last record I might want to search backwards. I don't want to go from the top.
I am going to click this check box or we search from the top. I can use wildcards, wildcard expressions. So for example if I want to search for anything that's ended with park, I might use asterisks in the word park at the end. I would find all the records ending with the word park. Regular expressions, similarity searches that allows you to type in something like Jurassic and you are not sure of the spelling, it will find maybe Jurassic spelled correctly or incorrectly throughout your database. So similarity search, a little more advanced so we are not going to use that right here. I am just going to leave it at Jurassic. Searching for that word in the Movie Title field and when I click the Search button let's see what happens. You can see right away I was taken to record 2 of 3, in behind. And there is Jurassic right there in the Movie Title with a capital J because I didn't ask to match case, it founded even when I typed it in lower case. Now I can continue searching.
If I click the Search button again. You can see I am at record 2 still, overflow search continued at the beginning and each time I click it's going to start at the beginning it's only finding that one record. So I can close that up. I click the Close button, closes up the dialog box and it leaves me at the record with the word that I was searching for up here in the Movie Title. So maybe I want to find this record for whatever reason, maybe to add some additional information to the subject or fill in some empty fields in this case, every thing is just the way I want it. All right let's go to the end now. And I click the last record it happens to be Jaws and I am going to go back to my Find Record button down here at the bottom. There is my record search. Neat thing is under Text, if I click the dropdown, it remembers text that I searched for so there is Jurassic that I want to search for it again, simply click it, it's selected. I can actually type over that to if I wanted to. So in this case I am going to type in Spielberg. Again I am not going to use any capital letters or anything just typing Spielberg like so. I am at the end of the last record, remember? So I am at the end of my database here in the form. So in this case I am going to be searching all fields, you may show up in more than one field I am not sure. And I want to search backwards this time. So I am going to choose Search Backwards, when I click the Search button let's see what happens. Well, there I am at record 3, and it was what was showing anyway and there is the Director : Spielberg and I click Search again. It takes me back to record 2 okay he is the Director for Jurassic park as well. And if I click Search again, back to record 3, so I am searching backwards in this case. With each click I alternate through those records. click Close. I am left at Jurassic Park with Spielberg as the Director. So keep in mind that when you begin to build up your database with records whether you are inputting them into the table or in to a form like this you have the ability to locate specific information in your records.
Thanks to this little guy down here the Find Record button.
- Planning and designing a database Working with tables, fields, and records Creating relationships between tables Refining query results with sorting and filters Printing, emailing, and exporting reports as PDFs