How to Filter an Access List Box Based on Another List Box Selection
Question details
The user needs to populate a second list box based on the item selected in the first list box within a Microsoft Access form.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Building a form with cascading list boxes where selecting an item (like a teacher) dynamically filters the choices in a second list box.
- Observed behavior
- The user wants to link two list boxes so the second dynamically filters its records when the first list box's selection changes, avoiding invalid references or parameter prompt errors.
Ensure you have named your form controls clearly (e.g., List1, List2) and verify that your database tables have correctly defined primary and foreign key relationships before modifying row sources.
Update the Row Source and Requery Using VBA
Set up an SQL query as the row source for the second list box and use a simple VBA command to requery it when the first selection changes.
To create cascading list boxes in Microsoft Access, the second list box must use an SQL query that references the value of the first list box in its WHERE clause.
A common mistake is forgetting to refresh the second list box after making a selection in the first one. Adding a short VBA requery command fixes this.
Open your form in Design View, select the second list box, go to the Property Sheet, and enter a Row Source like: SELECT Resource.StudentID FROM Resource WHERE Resource.TeacherID = Forms!YourFormName!List1;
Select the first list box, go to the Event tab in the Property Sheet, and click the builder button (...) next to 'After Update' to open the VBA editor.
In the VBA editor, type 'Me.YourSecondListBoxName.Requery' inside the event sub. This ensures the second list box updates its filtered data whenever the first list box changes.

Use Query Builder for the Row Source
Use the Access visual Query Builder to link tables and set criteria visually without writing raw SQL strings.
Looking for a Free and Lightweight Office Suite?
While Microsoft Access is used for complex relational database management, WPS Office provides an excellent, free alternative for all your core document, spreadsheet, and presentation needs. It is highly compatible with Microsoft Office formats and offers a familiar, user-friendly interface.
- 1. Visit the official website: Go to the official WPS Office website to find the correct installation package for your system.
- 2. Download the software: Click the Free Download button and wait for the installer to download.
- 3. Install and open your files: Run the installer, open WPS Office, and seamlessly view or edit your existing Office files.

Frequently Asked Questions
Why does Access prompt me for a parameter value when I select the first list box?
This usually happens if the form name or list box control name in your SQL row source is spelled incorrectly. It can also occur if the referenced form is closed when the query runs. Double-check your Forms!FormName!ControlName spelling.
Do I need to use VBA to make cascading list boxes work in Access?
Yes. While you can configure the row source using SQL or the Query Builder, you still need a single line of VBA code (Me.SecondListBoxName.Requery) in the 'After Update' event of the first list box to force the second box to refresh its data.
Can I use a combo box instead of a list box for the first selection?
Absolutely. The logic and process are identical. You can use a combo box for the initial selection and reference its control name in the second list box's row source query.




