AllowFilters Property

AllowFilters Property

See Also         Example         Applies To

You can use the AllowFilters property to specify whether records in a form can be filtered.

Settings

The AllowFilters property uses the following settings.

Setting Visual Basic Description
Yes True (–1) (Default) Records can be filtered.
No False (0) Records can't be filtered.

You can set this property by using the form's property sheet, a macro, or Visual Basic.

Remarks

Filters are commonly used to view a temporary subset of the records in a database. When you use a filter, you apply criteria to display only records that meet specific conditions. In an Employees form, for example, you can use a filter to display only records of employees with over 5 years of service. You can also use a filter to restrict access to records containing sensitive information, such as financial or medical data.

When the AllowFilters property is set to No, all of the filter options on the Records menu, the form's shortcut menu, and the Formatting (Form/Report) toolbar are disabled. The commands and buttons include:

Note   Setting the AllowFilters property to No does not affect the Filter, FilterOn, ServerFilter, or ServerFilterByForm properties. You can still use these properties to set and remove filters. You can also still use the following actions or methods to apply and remove filters.

Actions Methods
ApplyFilter ApplyFilter
OpenForm OpenForm
ShowAllRecords ShowAllRecords