Applies the filter that was set during a rowset’s Filter mode.


<oRef>.applyFilter( )


The rowset whose filter criteria you want to apply.

Property of



Rowset objects support a Filter mode in which values can be assigned to Field objects and then used to filter the rows in a rowset to show only those rows with matching values. beginFilter( ) puts the rowset in Filter mode and applyFilter( ) applies the filter values. clearFilter( ) cancels the filter. Because dataLinked controls on forms write to the value properties of Field objects, a call to those three methods are all you need to implement a filter-by-form feature in your application.

When applyFilter( ) is called, the row cursor is repositioned to the first matching row in the set, or to the end-of-set if there are no matches. The rowset’s filter property is updated to contain the resulting SQL expression used for the filter. applyFilter( ) returns true or false to indicate if a match was found.

To filter rows with a condition without using Filter mode, set the rowset’s filter property directly. See the filter property for more information on how filters are applied to data. To filter rows with dBL code instead of or in addition to an SQL expression, use the canGetRow event.