Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

MS Access combo box


May 17, 2021 MS Access


Table of contents


When you enter data in any form, it is faster and easier to select a value from the list than to remember the value you want to enter. /b10> Selecting a list also helps ensure that the values entered in the field are appropriate. /b11> List controls can connect to existing data or display fixed values that were entered when the control was created. I n this chapter, we'll show you how to create a combo box in Access.

Combo box

A combo box is an object or control that contains a down-and-down list of values from which the user can select.

  • Combo box controls provide a more compact way to render a selection list.
  • The list is hidden until you click the down arrow.
  • Combo boxes also enable you to enter values that are not in the list.
  • In this way, combo box controls combine the functionality of text boxes with list boxes.

Example

Let's create a combo box with a simple example. We created a form for the employee, as shown in the screenshot below.

MS Access combo box

We're going to create a combo box for the phone type now because we know that the phone type should be Home, Cell, or Work. on.

Now let's go to the design view of this form. Select the Phone Type field, and then press Delete.

MS Access combo box

MS Access combo box

After you delete the phone type field, go to the Design tab.

MS Access combo box

Now let's select the Use Control Wizard option from the control menu, and then select the combo box control from the menu, as shown in the following screenshot.

MS Access combo box

Now, draw the combo box that you want, and when you release your mouse, then you'll see the combo box wizard dialog box.

MS Access combo box

Here you have different data options; L et's select the second option, where we'll add the value and click Next.

MS Access combo box

Enter the values you want to display in the drop-down list, and then click Next.

MS Access combo box

Click Next again.

MS Access combo box

Enter the label for the combo box, and then click Done.

MS Access combo box

You can see that the combo box has been created, but not aligned with other fields. Let's start by selecting all the fields, and then go to the Arrange tab.

MS Access combo box

On the left, you'll see the Stacked option. Click this button.

MS Access combo box

You can now see the field alignment.

In order to make each field the same size, we have different options, let's click the size/space button.

MS Access combo box

From the drop-down list, click to the shortest.

MS Access combo box

Now go to the form view.

MS Access combo box

Users can now easily select any option for the phone type.