Filter a Microsoft Access Continuous Form with an Option Group
Question details
Filter a continuous form to show all records or records with a True or False value in a Yes/No field.

- 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.
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.
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.
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.
Select the option group, open Property Sheet > Event, and set After Update to [Event Procedure]. Click the build button (...) to open the VBA editor.
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.
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.

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.

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.




