This article was previously published under Q209585
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
When you are entering a large amount of data and want to open a combobox, it is inconvenient to have to press additional keys or stop touse the pointer. In Microsoft Access, you can use the Dropdown method to force the list in the specified combo box to drop down. Using this method is identical to pressing the F4 key when the control has the focus.
The following steps show how to create a new form with a combo box named EmpLastName that will automatically display the list when you select the combo box.
Open the sample database Northwind.mdb or Access project NorthwindCS.adp.
Set the combo box's OnGotFocus property to the following event procedure:
Private Sub EmpLastName_GotFocus() EmpLastName.DropdownEnd Sub
Open your form in Form view, and press the TAB key to move to your combo box.
For more information about the Dropdown method, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type Dropdown method in the Office Assistant or the Answer Wizard, and then click Search to view the topic.