1-866-245-5224 sales@keystonelearning.com

Access 2007: Working with Combo Boxes

Access 2007: Working with Combo Boxes

When entering data on forms, it is often quicker and easier to select a value from a list than to remember a value to type. A list of choices also helps ensure that the value that’s entered in a field is appropriate.

When you use a combo box in an Access form, all you see is a text box that doesn’t display the list until you click the drop-down arrow.

Figure 11. Combo Box Sample

List boxes and combo boxes can be bound or unbound controls. These controls can look up values in a fixed list that you type yourself, or they can look up values in a table or query.

Creating a Combo Box that Looks Up Values

     
  1. Open the form in Design View
     
  2.  
  3. Choose the Combo Box command in the Controls group on the Form Design Tools Design Contextual tab
     
  4.  
  5.  Click and drag to draw the Combo Box on your form
     

Figure 12. Combo Box Wizard - Choose Combo Box Option

    4.     Choose “I want the combo box to look up the values in a table or query.

    5.   Click Next

 

Figure 13. Combo Box Wizard - Choose a Table or Query

 

    6.     Select the Table or Query that contains the values you want to look up

    7.     Click Next

 

Figure 14. Combo Box Wizard - Choose Combo Box Fields

   

    8.     Move the fields you want to appear in your lookup list from the Available Fields column to the Selected Fields column

    9.     Click Next

 

Figure 15. Combo Box Wizard - Choose Sort Order

 

    10. Choose a Sort order, if desired

    11. Click Next

 

Figure 16. Combo Box Wizard - Resize Combo Box Columns

 

    12. Resize the Combo Box columns

    13. Click Next

 

Figure 17. Combo Box Wizard - Choose Primary Key Field

 

    14. Choose to store the value in a primary key in the record source

    15. Click Next

 

Figure 18. Combo Box Wizard - Create a Name

 

    16. Enter a Name for your combo box

    17. Click Finish

    18. Save the form

    19. View the form in Form View

    20. Test the new Combo Box

 

Figure 19. Combo Box Sample

Creating a Combo Box for Values You Enter

     
  1. Open the form in Design View
     
  2.  
  3. Choose the Combo Box command in the Controls group on the Form Design Tools Design Contextual tab
     
  4.  
  5.  Click and drag to draw the Combo Box on your form
     

Figure 20. Combo Box Wizard - Choose Combo Box Option

 

    4.     Choose “I will type in the values that I want

    5.     Click Next

 

Figure 21. Combo Box Wizard – Enter Combo Box Values

 

    6.     Enter the combo box values

    7.     Resize the column

    8.     Click Next

 

 

Figure 22. Combo Box Wizard – Remember the Value

 

    9.     Choose to remember the value for later use

    10. Click Next

 

Figure 23. Combo Box Wizard - Create a Name

 

    11. Enter a Name for your combo box

    12. Click Finish

    13. Save the form

    14. View the form in Form View

    15. Test the new Combo Box

 

Figure 24. Combo Box Sample