ADO » DataControl » FilterValue

Syntax:
string = datacontrolobject.FilterValue
datacontrolobject.FilterValue = string

Sets the value of the filter. Does not activate the filter.

The FilterValue property sets or returns a string that specifies the value that the filter will use to evaluate the data.

The FilterColumn, FilterCriteria, and FilterValue properties are used together to create a string filter that can be applied to the records in a Recordset contained in the client-side cache. To execute the filter, you need to call the Reset method. Based upon the filter, a subset of those records in the Recordset will be returned. Meanwhile, the original Recordset will remain unchanged in the client-side cache.

If you change the value of the FilterValue property, you must call the Reset method to put the change into effect.

If you wish to completely clear the filter that is in effect, you need to set the FilterColumn, FilterCriteria, and FilterValue properties to be the empty string and call Reset with a value of False for the parameter.

Examples

Code:
Dim strFilCol, strFilCrit, strFilVal
strFilCol = "Age"
strFilCrit = ">"
strFilVal = "99"
...
objDataControl.FilterColumn = strFilCol
objDataControl.FilterCriterion = strFilCrit
objDataControl.FilterValue = strFilVal
objDataControl.Reset

See Also: