Our form has the basic design and functionality we need, but we can make it easier to use by creating a combo box to find specific students' records. We will create a combo box to help us find records for specific students. A combo box creates a drop-down list. In this case, we will create a combo box to select a student record to view and modify.
Creating a Record Navigation Combo Box
We must be in Design View to add combo boxes, so we will first switch to that view and then add the combo box.
Step1. Switch to Design View, if necessary.
Step2. To select the combo box tool, on the Ribbon,
Click the Design tab, Click
Step3. To add a record navigation combo box, with the combo box tool selected,
Click in the form header at the 5" mark on the ruler
Step4. To tell Access we are creating a record navigation combo box,
Click Find a record on my form based on the value I selected in my combo box
Step5. To move to the next screen,
Step6. To add the fields we want in our combo box, in the Available Fields column,
Double-Click student_id, last_name, first_name, email
Step7. To continue,
Step8. To accept these default choices and continue,
Step9. To label the combo box and finish creating it, type:
Find Student:, press: Enter
Step10. To widen the combo box,
Point to a handle on the right, with the left-right arrow, Press & Drag to the right
Step11. To make the combo box's label text white,
Click the combo box label,
Click the Format tab, Click
Using the Record Navigation Combo Box
Let's switch into Form view, then use our new combo box to find a student record.
Step1. Switch to Form view.
Step2. To open the combo box,
Step3. To select Brenda Sanchez's record, the fourth record from the top of the initial list,
Refining the Record Navigation Combo Box
In using the combo box the first time, we can see ways it can be improved. First, it needs to list students in alphabetical order. Second, the list itself might need to be wider. We already widened the combo box, but that doesn't affect the width of the drop-down list. In the drop-down list, the email address might be cut off due to the scrollbar. We can widen the list to prevent that problem.
Step1. Switch to Design View.
Step2. To select the combo box,
Click the combo box
Step3. To view the Property Sheet, if necessary, on the Ribbon,
Click the Design tab, Click
Step4. To begin modifying the drop-down list to display its records in alphabetical order, in the Property Sheet,
Click the Data tab, Click Row Source (2nd row)
Step5. To modify the underlying query for the combo box,
Step6. To modify the query to display its records in alphabetical order, in Sort row for last_name, type:
a Tab key a Tab key a
Step7. To preview the query, on the Ribbon,
Step8. Save the changes.
Step9. To close the query window,
Right-Click, Click Close
Step10. To begin changing the list width, in the Property Sheet,
Click the Format tab
Step11. To change the list width,
Click List Width, type: 3.15, press: Enter
Using the Refined Combo Box
Now that we have addressed the two main usability concerns with the combo box, let's return to Form View and test it out.
Step1. Return to Form view.
Step2. To select a different student record, in the combo box,
Click, scroll down, Click
Step3. Save and close frmStudentRegistration.