PreviousActiveX Controls Guide (9.1 revision 1) Next

SelectedRecords

Show this topic in Library frames

Applies to:

VAccess

Description

The SelectedRecords property allows you to specify filter conditions to limit the range of records which will be returned in an extended fetch record set.

Syntax

object.SelectedRecords = fieldname operator (fieldname 
or "constant") [[conjunction fieldname operator 
(fieldname or "constant")]...]  

The SelectedRecords property syntax has these parts:

Part
Description
fieldname
The name of a field to filter by value, may be any valid field in the file referenced by object. It does not necessarily have to be one of the fields specified in the SelectedFields property.
operator
One of the following logical operators: > (greater than), < (less than), = (equal to), <> (not equal to), >= (greater than or equal to), or <= (less than or equal to).
constant
A constant value. Constant values must be preceded and followed by quotation marks (Chr$(34)).
conjunction
If more than one filter comparison is required, comparisons must be joined by one of the following conjunction operators: & (and) or | (or).

Remarks

Leaving this property blank performs no filtering, i.e., returns all records in the order in which they occur the current index path.

Comparisons of string fields are case sensitive unless the fields were flagged as being case-insensitive when the table was defined. Parentheses are not supported; filter terms are resolved logically in the order in which they occur.

When comparing text fields to constant values, the SelectedRecords filter compares the lesser of the number of characters in the constant or the number of characters in the field. For example, consider the following filter:

city = "B"  

This filter returns any records in which the first character in the city field is "B". For example, the cities Baltimore, Boise, Boston, and Butte would be included.

The ExtendedOps property must be set to True to enable the extended operations capabilities of the VAccess control.

The Init method must be invoked before SelectedRecords filter will take effect.

See Also:

Affected by: SelectedFields, ExtendedOps, Init


Chapter contents
Publication contents

Prev topic: SelectedFields
Next topic: SessionID