Access XP
Finding Records
Introduction
By the end of this lesson, learners should be able to:
- Perform a simple find
- Use a wildcard to find a record
Performing a Simple Find
When you have an extremely large database consisting of thousands of records, you may need to quickly locate one of them. Access provides an easy way to find individual records: the Find function.
To use the Find Function:
- Click anywhere in the field that contains the data you want to search (e.g., Last Name).
- Choose EditFind on the menu bar or click the Find button on the toolbar to open the Find and Replace dialog box.
- In the Find What field, type the information you want to search. It may be a last name (e.g., Manning) or a portion of the last name (e.g., Man).
- The Look In drop-down box defaults to the field or column where the cursor was positioned when the Find was initiated. You can leave the definition as is if you know the information is contained in this field, or you can select search the entire table from the drop-down menu list.
- In the Match field, Access defaults to Whole Field but you can optionally select either Any Part of Field or Start of Field.
- Click the Find Next button to search for the first occurrence of a record that matches the search.
Performing a Simple Find
- Click the Cancel button if the record was found. The Find and Replace dialog box will close.
OR
- Click the Find Next button to search for the next record that meets the Find criteria.
In the event that Access did not find a match for the search, the Office Assistant will pop up to inform you that there were not any matched records found.
Using Wildcards to find records
If the simple Find did not find the record you sought then you can try typing an operator in the Find What text box of the Find and Replace dialog box. A common Access operator is a wildcard, a symbol representing one or more characters.
Wildcard |
Usage |
Example |
* |
Used at the beginning or the end of a search string to match one or more characters |
Sch* finds Schlotz and Schwartz. *ing finds Wheeling and Browning. |
? |
Matches any single alphabetic character |
Sp?ll finds spell and spill. |
# |
Matches any single numeric character |
9#1 finds 901, 911, 921, etc. |
To Search for a Record Using a Wildcard:
- Choose EditFind on the menu bar or click the Find button on the toolbar to open the Find and Replace dialog box.
- In the Find What field, type the wildcard combination (e.g., B*) to find the first record where the Last Name begins with the letter B.
- Click the Find Next button to begin the search. The first record found that matches the search is highlighted.
(The Office Assistant will provide notification if no matching records were found). - Click the Cancel button if the record was found. The Find and Replace dialog box will close.
OR
- Click the Find Next button to search for the next record that meets the Find criteria.
Challenge!
- Open the Contacts table in Datasheet View.
- Perform a Find function against the Contacts:Table Look In field to locate the Margaret record.
- Perform a Find Next function against the Contacts:Table Look In field to locate the William Henderson record.
- Perform a Find function against the Contacts:Table Look In field to locate the Don Mattingly record. Reply to the system prompt.
- Perform a Find function against the Contacts:Table Look In field and using a H* wildcard combination to locate the first record. Perform and repeat a Find Next function against the same wildcard combination as you move your way throughout the records in the database.
- Close the Contacts table and, if displayed, click the NO button in response to the Do you want to save changes to the design of table 'Contacts' system prompt.