How to Automatically Select the Next Combo Box Item in Access Forms
Question details
Configure an Access data-entry form so that a combo box automatically advances to and selects the next item in the list whenever a new record is created.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Performing repetitive data entry in an Access form where the user needs the combo box to sequentially select the next available item for each consecutive new record.
- Observed behavior
- By default, Access combo boxes do not automatically advance to the next list item for new records, requiring a custom VBA script utilizing the ListIndex property and form events.
Ensure you have a basic understanding of Microsoft Access VBA (Visual Basic for Applications) and have created a backup copy of your database before modifying form events.
Use VBA Form Events to Increment the ListIndex
Utilize a module-level variable combined with the form's Open, Current, and AfterInsert events to track and increment the combo box selection automatically.
The ListIndex property of a combo box is zero-based, meaning the first item is 0, the second is 1, and so on. A value of -1 indicates no selection. By storing the current index in a variable, you can increment it each time a new record is generated.
Keep in mind that modifying the ListIndex property programmatically via VBA does not trigger the combo box's AfterUpdate event, so any dependent logic must be handled manually.
Open the VBA editor for your form (right-click the form, select 'Build Event', then 'Code Builder'). At the very top of the module, beneath 'Option Compare Database', declare a variable to store the index, such as: Dim lngIndex As Long
Select the 'Form' object and 'Open' procedure. Inside the Form_Open event, initialize your variable to -1 so that the first created record will properly advance to index 0 (the first item).
In the Form_BeforeInsert or Form_Current event, write logic to check if it's a new record. If it is, assign the combo box's ListIndex property to your variable plus one (e.g., Me.YourComboBoxName.ListIndex = lngIndex + 1).
In the Form_AfterInsert event, update your module-level variable to store the newly selected ListIndex so it is ready for the next record.
Ensure the control name referenced in your VBA code exactly matches the Name property of the combo box on your form (found in the Property Sheet), not just the underlying table field name.

Upgrade Your Daily Productivity with WPS Office
While Microsoft Access handles complex relational database tasks, WPS Office provides a powerful, free, and lightweight alternative for your everyday word processing, spreadsheet, and presentation needs. Experience seamless Microsoft Office format compatibility, a highly familiar interface, and excellent performance.
- 1. Download the Installer: Visit the official WPS website and download the free WPS Office installation package for your operating system.
- 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to set up the software in minutes.
- 3. Open and Edit Seamlessly: Launch WPS Office and directly open your existing Word (.docx), Excel (.xlsx), or PowerPoint (.pptx) files without losing any formatting.

Frequently Asked Questions
Why does changing the ListIndex in VBA not trigger my combo box macros?
In Microsoft Access, programmatically altering a control's value or ListIndex via VBA does not fire the BeforeUpdate or AfterUpdate events. You must explicitly call the event procedures from your code if you want them to run.
What does a zero-based ListIndex mean?
A zero-based ListIndex means the items in the combo box list start counting at 0. The first item in the dropdown is index 0, the second is index 1, and so forth. A ListIndex of -1 means that no item is currently selected.
How do I find the exact name of my combo box to use in VBA?
Open your form in Design View, click on the combo box control, and press F4 to open the Property Sheet. Click on the 'All' or 'Other' tab, and look at the 'Name' property at the very top. Use this exact name in your VBA code.




