1.5. Add and Configure Controls Using Wizards

In addition to the command button wizards, you can use wizards to populate list boxes and combo boxes on your form. The Combo Box Wizard allows you to control the data within your combo box, as well as how the combo box is displayed. To launch the Combo Box Wizard, click the Combo Box icon in the Control Toolbox and click your form to place the combo box on your form. The first step of the Combo Box Wizard, shown in Figure 1-13, prompts you to choose where the data for your combo box comes from.

If you choose to type in the values you want, Access allows you to enter the data directly in the wizard. You can enter as many values as you need in multiple columns. Don't worry if you can't think of every option you want in your combo box, you can always go back and enter more options later.

If your combo box values are stored in a table or query, the second step of the Combo Box Wizard (shown in Figure 1-14) allows you to choose a table or query as the source of your combo box. Click Next to choose the fields in the table you want displayed in your combo box. The next step allows you to specify a sort order for your combo box. Click Next again to configure the column width of your combo box. Click Next one last time to give your combo box a label. Click Finish to save your combo box.

Figure 1.13. Figure 1-13

The Combo BoxWizard doesn't ...

Get Access 2003 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.