Others

Filter a Microsoft Access Continuous Form with an Option Group

Ayan MasoodAyan Masood Nov 20, 2026 869 views

Question details

Filter a continuous form to show all records or records with a True or False value in a Yes/No field.

Filter a Microsoft Access Continuous Form with an Option Group
Product
Microsoft Access
Device & OS
not provided
Scenario
A user wants an option group on a continuous form to control which records are displayed.
Observed behavior
The desired filter should use the actual field name and Boolean values rather than localized display text.
Before you start

Open the form in Design View and confirm the exact name of the Yes/No field in its record source. Identify the option group control and check that its options have distinct values for All, True, and False.

Solution 1Recommended

Apply a Boolean filter from the option group's After Update event

Use this approach to switch between all records and the two Yes/No values without relying on localized display text.

The example assumes the option group is named grpFilter, its option values are 1 for All, 2 for True, and 3 for False, and the field is named OK. Replace these names with the actual control and field names, preserving brackets around the field name.

1
Set the option values

Open the form in Design View, select each option button in the group, and use the Property Sheet to set its Option Value to 1, 2, or 3. Set the option group's Name to grpFilter or use its existing name in the code.

2
Open the event procedure

Select the option group, open Property Sheet > Event, and set After Update to [Event Procedure]. Click the build button (...) to open the VBA editor.

3
Add the filter code

Inside the generated After Update procedure, enter: Select Case Me!grpFilter.Value Case 1 Me.FilterOn = False Me.Filter = "" Case 2 Me.Filter = "[OK] = True" Me.FilterOn = True Case 3 Me.Filter = "[OK] = False" Me.FilterOn = True End Select. Replace OK with the exact field name from the form's record source, including any localized characters.

4
Test each option

Save the form, switch to Form View, and select each option. Confirm that All removes the filter and that the other options show the corresponding Yes/No records.

Apply a Boolean filter from the option group's After Update event
Check for Null values: Records with a Null field value do not match either the True or False filter. They appear when the filter is turned off.
Free Microsoft Office alternative

Filter exported Access data in WPS Spreadsheets

WPS Office is a free, lightweight Office alternative with a familiar interface and compatibility with Excel formats for easy migration. Export Access records to an Excel file or CSV to filter them in WPS Spreadsheets; WPS does not replace Access forms or their VBA events.

Filter exported Yes/No values in a spreadsheet.Open and work with Microsoft Excel XLSX and XLS files.Use a familiar, easy-to-use spreadsheet interface.Move exported data into a free, lightweight Office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the filter fail when I use the displayed field label?

The displayed label may differ from the field name in the form's record source. Check the actual name and use it in brackets, such as [OK], in the Filter expression.

Should I use localized words for True and False?

No. Use the Boolean values True and False in the filter expression, even if Access displays localized words for those values.

Why doesn't selecting an option apply the filter?

In Design View, check the option group's After Update property and confirm it points to the event procedure. Also verify the control name and each option's Option Value against the VBA code.

How do I show all records again?

Select the All option configured with value 1. Its VBA case sets FilterOn to False and clears the form's Filter property.

Can WPS Office run this Access form filter?

No. The option group and VBA event require Microsoft Access. You can export the records from Access to Excel or CSV and filter the exported data in WPS Spreadsheets instead.