= CHAPTER 6 Access More Skills 11 Add Option Groups to Forms An option group is a frame with a set of check boxes, toggle buttons, or option buttons. Option groups can be bound or unbound to a field. When bound to a field, the option selected will be entered as a value into the underlying table. To complete this database, you will need the following file: a06_park You will save your files as: Lastname_Firstname_a06_Park Lastname_Firstname_a06_Park_Snip 1. Start Access and open the student data file a06_park. Click the File tab, and then Save the file in your Access Chapter 6 folder with the name Lastname_Firstname_a06_Park If necessary, enable the content. 2. Display the Create tab, and then in the Forms group, click Blank Form. 3. In the displayed Field List pane, click Show all tables, click the Employees expand button, and then double-click the following fields in this order: Employee ID, First Name, Last Name, and HP_ID. Close the Field List. Compare your screen with Figure 1. Fields added to form Figure 1 Add Advanced Form Features Microsoft Access Chapter 6 More Skills: SKILL 11 Page 1 of 5
4. Click Save. In the Save As dialog box, type Employee Health Insurance Click OK. 5. Switch to Design view, and then drag down the lower edge of the form about 1 inch. 6. On the Design tab, in the Controls group, click the More button. From the displayed list, click the Option Group button. 7. Position the pointer on the 1.5 inch vertical grid line just below the HP_ID control, click one time, and then compare your screen with Figure 2. The Option Group Wizard displays. Option Group Wizard Figure 2 Add Advanced Form Features Microsoft Access Chapter 6 More Skills: SKILL 11 Page 2 of 5
8. In the displayed Option Group Wizard, in the Label Names column, type Plan A Press F, and then type Plan B Press F, and then type Plan C Compare your screen with Figure 3. Plan A, Plan B, and Plan C are the three values that can be entered into the HP_ID field. Label names Figure 3 9. Click Next. Under Do you want one option to be the default choice?, click the down arrow, and then click Plan B. The default choice is the option button that will be selected when the record displays in the form. Here, Plan B will be automatically entered as the employee s health plan unless another choice is made by the person using the form. Add Advanced Form Features Microsoft Access Chapter 6 More Skills: SKILL 11 Page 3 of 5
10. Click Next, and compare your screen with Figure 4. Here, each label corresponds to the primary key value in the Health Plan table for each of the three health plans. Labels entered Figure 4 11. Click Next. Under What do you want to do with the value of a selected option?, select the Store the value in this field option button. Click the Store the value in this field box arrow, and then click HP_ID. 12. Click Next. Under What style would you like to use, select the Shadowed option button. In the Sample area, notice the option group displays the Shadowed style. 13. Click Next. Under What caption do you want for the option group,type Health Insurance and then click Finish. 14. Move the pointer over the lower left option group control handle. Press and hold the left mouse button, and then drag the control down to the 2 inch vertical grid line and the 1 inch horizontal grid line. Add Advanced Form Features Microsoft Access Chapter 6 More Skills: SKILL 11 Page 4 of 5 Copyright 2011 by Pearson Education, Inc. publishing as Prentice Hall. All rights reserved.
15. Switch to Form view, and then in the Option Group, click the Plan B option button an option button with an empty circle for no and a circle with a black dot for yes. Compare your screen with Figure 5. Notice that the HP_ID label is automatically populated with a 2. In this manner, the option button group can be used to enter values into the Employees table. Your Option Group may look different from Figure 5. Health Insurance value assigned Plan B selected Option Group label Figure 5 16. Switch to Design view. Click the label with text Health Insurance, and then press X. 17. Switch to Form view. Click Start, and then click All Programs. Click to open the Accessories folder, and then click Snipping Tool. 18. In the displayed Snipping Tool program, click the New button arrow, and then click Full-screen Snip. 19. Click the Save Snip button. Navigate to your Access Chapter 6 folder, Save the file as Lastname_Firstname_a06_Park_Snip and then Close the Snipping Tool mark-up window. 20. Click Save, and then Close the form. Submit your work as directed by your instructor. 21. Exit Access. You have completed More Skills 11 Add Advanced Form Features Microsoft Access Chapter 6 More Skills: SKILL 11 Page 5 of 5 Copyright 2011 by Pearson Education, Inc. publishing as Prentice Hall. All rights reserved.