ServerFilterByForm Property

ServerFilterByForm Property

See Also                  Applies To

You can use the ServerFilterByForm property to specify or determine whether a form is opened in the Server Filter By Form window.

Setting

The ServerFilterByForm property uses the following settings.

Setting Visual Basic Description
Yes True (–1) The form is opened in the Server Filter By Form window.
    Note   When the ServerFilterByForm property is True, the Filter By Form feature is disabled.
No False (0) (Default) The form is not opened in the Server Filter By Form window.

The easiest way to set the ServerFilterByForm property is by using a form's property sheet. You can set this property by using Visual Basic.

To set the ServerFilterByForm property, you must first either:

If the ServerFilter property has been set, you can also set this property by clicking Apply Server Filter on the Form View toolbar or the Filter/Sort toolbar.

Remarks

To apply a saved filter to a form, press the Apply Server Filter button, or apply the filter by using a macro or Visual Basic by setting the ServerFilterByForm property to True (-1).

The Apply Server Filter button indicates the state of the ServerFilter and ServerFilterByForm properties. The button remains disabled until there is a filter to apply. If an existing filter is currently applied, the Apply Server Filter button appears pressed in. To apply a filter automatically when a form opened, specify in the OnOpen event property setting of the form either a macro that uses the ApplyFilter action or an event procedure that uses the ApplyFilter method of the DoCmd object.

You can remove a filter by using Visual Basic to set the ServerFilterByForm property to False (0) or clear all filter criteria in the Server Filter By Form window and then click Apply Server Filter.

Notes