Enter data manually in a data base it is delicate. Entering a value incorrectly can be a serious problem. To avoid such situations, it is advisable to use combo boxes and list boxes in Microsoft Access. If you are interested in knowing what are they, what are they for and how create them, continue reading.
The frame controls on the platform make it very easy to the process of entering new records. Well, you just have to choose the appropriate value in its corresponding field.
At the time of create a listing, you can specify your fixed values, O well link it with existing data in the registry.
What are combo box and list controls and what are they for in Access?
In simple terms, the controls They are tools that offer greater work options to the user. In this way, it is possible to view and control the information in a database. Some of the most common in Microsoft Access are the combo box and list controls. For that reason it favors you to know what are they and what are they for. The platform Access offers the user two list controls to be used on a form: Combo or Hybrid Box and List Box.
Let’s see its characteristics:
- List box: It is a control that allows you to use a list of specific values. The information is contained in rows of data, which can be distributed in one or more columns. The control can have a header, although it is optional.
- Combo box: It is similar to a list of options, but its display form is much more compact. The values remain hidden until the user displays the list by clicking the expand arrow. It is known as a hybrid box because it also has the properties of a text box.
What are the benefits of using hybrid and listing box controls in Access?
When filling out a form, the use of list controls is highly recommended. On the platform Microsoft Access, Hybrid and Listing Tables Offer Many Benefits.
The most prominent are:
- They are customizable. You can edit the properties of the list box or combo box to better suit the requirements of the form. For example, you can change the sorting criteria, link columns, hide columns, add headings, limit entries, set a maximum number of rows, etc.
- In the case of list boxes, the user is limited only to the options reflected in the list. The option to write a new value is not allowed. Therefore, the chances of making a mistake are low.
- In the case of the combo box, you can enter a new value if necessary, since it also functions as a text box.
- They are linkable. Both controls have the property of being bound or not. Similarly, they can locate values from a fixed list drawn up by the user, from a data table or query.
- They are fast and efficient. It is no longer necessary to remember the appropriate value that goes in each field. Neither are misspellings possible. You just have to select the precise value in the corresponding field. This way you save time and effort during your administrative tasks.
Learn step-by-step how to create combo box and listing controls in Access
You can add a combo box or list box with any of the following methods: Through the wizard, by creating a search field, or through design view without resorting to the wizard.
Here’s a step-by-step show on how to create combo box and listing controls in Access:
Create list or combo box with wizard
- Open Microsoft Access. Then, in the navigation panel, right click on the form. Then click “Design View”.
- Notably the form must be linked to a query or data table. To verify that there is a link, you must press the key F4. So you can view the property sheet. Then click on the tab “Data”. Picture “Origin of the registry” It confirms whether or not the form is linked to a table or query.
- Select the tab “Use wizard for”. The button is in the group “Controls”, in the tab “Design”.
- Two options appear: List box tool and combo box tool. Select the one of your preference.
- Return to the form. Click anywhere in the document to place the hybrid box or the list box.
- According to your previous selection, the screen appears Combo Box Wizard or List Box Wizard.
- The wizard asks you how you want to get the values for the control. In that scenario, perform any of the following actions:
- Click on “I want the list box or combo box to search for values in a table or query” if you want to display the current data coming from a record source.
- Click on “I will write the values you want”If you prefer to use the data from a fixed list of values that may vary from time to time.
- Click on “Find a record in the form based on the value I have selected in my combo box or list box”If you want to create a control that works as a search engine instead of a tool to enter values.
- Follow the wizard’s instructions to determine how the values should appear on the screen.
- If you have chosen any of the first two actions, the assistant of Microsoft Access It asks you what you want the platform to do when selecting a security. In such a scenario, do one of the following:
- Create a dependent control: Click “Store value in field.” Then select the field to link to the control.
- Create a separate control: Click on “Remember the value to use it later.” The platform Access it is in charge of saving the chosen value, until it is changed by the user, or the form is closed. The value is not entered into a data table.
- After completing the operation, click “Next”. Enter a label to identify the control. This label will appear later along with the control. Then click “Finalize”.
Create a combo box or list box by appending a lookup field
In a data table, create a field of search. Can contain single value or be of value multiple.
Subsequently, carry out any of the following operations:
- Create a new form: It must be based on a record source in which the lookup field is included. Select a table or query that has a search field. Then, in the tab “Create” of the group “Forms”, click on the button “Forms”.
- Automatically, the platform Microsoft Access takes care of creating a combo box for the search field.
- Add a hybrid box or list box to the form: Select the “Design View”. Then you open a form based on a record source, which includes a search field.
- Press the Alt + F8 keys in case the panel “List of fields” does not appear on the screen.
- Double click on the search field. You can also drag the field from “List of fields” to the form. The platform Access is responsible for creating, automatically, a combo box linked to the search field.
Keep in mind that you can change the hybrid box to a list box, or vice versa, at any time. Right click on the newly created control. Go to the context menu and click on “Switch to”. Finally, choose the type of control you want to use.
Create a combo box or list box with Design view without the wizard
- Open the form in Microsoft Access. Make sure you are in the “Design View”.
- Address the group “Controls” and click on the tab “Design”. You must verify that the box “Use wizard for controls” is not activated.
- Click on one of the following tools: Combo box or list box.
- Return to the form and click anywhere in the document to create a default size control.
- You can too click and drag until the control is the desired size.
- Select control. After press the F4 key to open the property sheet.
- Set the properties “Row origin type” Y “Origin of the row”.
- Click on the properties box “Number of columns” if you want to show more than one column in the selected control.
- Write the number of columns you want. In the same way, you can also configure the “Width of columns”.
- Finally, you must decide if you want the platform Microsoft Access save the selected value. Locate the properties box “Origin of control” and select the field that should be linked to the combo box or list box.
If you have any questions, leave them in the comments, we will answer you as soon as possible, and it will also be of great help to more members of the community. Thank you! 😉