logo
search
Others

How to Filter Multiple Columns in an Access Continuous Form

WPS EditorWPS Editor Oct 9, 2026 868 views

Question details

The user needs to apply multiple combo box filters simultaneously in a Microsoft Access continuous form so that all selected criteria combine to restrict the records properly.

How to Filter Multiple Columns in an Access Continuous Form
Product
Microsoft Access
Device & OS
not provided
Scenario
Filtering records in a continuous database form using multiple dropdown combo boxes to refine search results.
Observed behavior
The user requires a reliable method to combine multiple active criteria using AND logic without conflicting events or syntax errors.
Before you start

Ensure your continuous form is bound to a valid table or query, and verify that you have assigned logical names to your combo boxes (e.g., cboStatus, cboCategory) before adding any VBA code.

Solution 1Recommended

Use VBA AfterUpdate Events to Build a Combined Filter String

This is the most reliable way to dynamically filter an Access form based on multiple combo box selections using AND logic.

Instead of using the Change event, which fires with every keystroke, use the AfterUpdate event. This triggers only when a user commits to a selection in the combo box. By routing all combo box updates to a single function, you can build a unified filter string.

1
Open Form in Design View

Right-click your continuous form in the navigation pane and select Design View.

2
Create a Filter Subroutine

Press Alt + F11 to open the VBA editor. Create a new Private Sub routine called ApplyFilters. In this sub, declare a string variable (e.g., strFilter) and check each combo box. If a combo box is not null, append its field criteria to strFilter with an ' AND ' separator.

3
Apply and Clean the Filter String

In your VBA code, use the Len() function to remove the trailing ' AND ' from your combined string. Then, apply it using Me.Filter = strFilter and turn the filter on using Me.FilterOn = True. If strFilter is empty, set Me.FilterOn = False.

4
Link to AfterUpdate Events

Select each combo box on your form, open the Property Sheet (F4), go to the Event tab, and set the 'After Update' event to [Event Procedure]. Inside each of these event procedures, simply type 'ApplyFilters' to trigger your combined filter logic.

Use VBA AfterUpdate Events to Build a Combined Filter String
Handling Empty Criteria: Setting Me.FilterOn to False when no criteria are selected ensures that all records are correctly displayed when users clear their dropdown selections.
Free Microsoft Office alternative

Try WPS Office for Your Documents, Spreadsheets, and Presentations

While Microsoft Access manages relational databases, most users handle lists, data tracking, and reporting in spreadsheets. WPS Office offers a powerful, free, and lightweight alternative to Microsoft Office. With a familiar interface and built-in PDF tools, you can seamlessly migrate your workflow and manage structured tabular data easily.

Seamlessly compatible with Microsoft Excel (.xlsx), Word (.docx), and PowerPoint formats.Manage structured data, filter multiple columns, and track lists efficiently using WPS Spreadsheet.Lightweight software that runs smoothly on most computers, saving system resources.Familiar user interface requiring zero learning curve for users switching from Microsoft Office.
microsoft office alternative - wps office

Frequently Asked Questions

Why shouldn't I use the On Change event for filtering in Access?

The On Change event fires every time a single character is typed or altered. This can cause incomplete filter strings, erratic form behavior, and errors. The AfterUpdate event is safer because it only fires once the user has completely finished and committed their selection in the combo box.

How do I clear all filters on my continuous form?

You can add a command button named 'Clear Filters' to your form. In its On Click event via VBA, write code to set Me.Filter = "", Me.FilterOn = False, and set all of your filtering combo box values to Null.

Why is my filter prompting for a parameter instead of filtering records?

This usually happens if a field name in your VBA filter string is misspelled or does not exist in the form's Record Source. Verify that the field names in your VBA code exactly match the column names in your underlying table or query.