Use this function to set a simple filter on a field, such as a single range or a single value.
FieldRef.SETRANGE([FromValue] [, ToValue])
The fieldref that refers to the field that you want to place a filter on.
The lower limit of the range. The data type of FromValue must match the data type of the field referred to by the fieldref.
The upper limit of the range. If you omit this parameter, the FromValue you specified is used. The data type of ToValue must match the data type of the field referred to by the FieldRef.
The SETRANGE function provides a quick way to set a simple filter on a field.
If you call this function with a field that already has a filter, that filter is removed before the new filter is set.
If you omit all of the optional parameters, all filters set for that field are removed.
The SETRANGE function fails if no field is selected.
This function is similar to thefunction.