QueryCriteria Class Methods
In this section, we discuss the QueryCriteria class methods. The methods are discussed in alphabetical order.
Syntax
AddExpr1Expression()
Description
The AddExpr1Expression method returns a reference to a new a QueryExpression object to be used as an expression for Expression 1. You can then use this object to specify details about the expression using the methods and properties of the QueryExpression Class.
Note: You must set the type for Expression 1 using the Expr1Type property before you can use this method.
Parameters
None.
Returns
A reference to a blank QueryExpression object.
Syntax
AddExpr1Field(QueryRecordAlias, FieldName)
Description
The AddExpr1Field method returns a reference to a new a QueryField object to be used as a field for Expression 1. You can then use this object to specify details about the expression using the methods and properties of the QueryField Class.
Note: You must set the type for Expression 1 using the Expr1Type property before you can use this method.
Parameters
Field or Control |
Definition |
---|---|
QueryRecordAlias |
Specify the alias of the QueryRecord that contains the QueryField that you want to use. |
FieldName |
Specify the name of the QueryField in the QueryRecord that you want to use. |
Returns
A reference to a blank QueryField object.
Syntax
AddExpr2Expression()
Description
The AddExpr2Expression method returns a reference to a new a QueryExpression object to be used as an expression for Expression 2. You can then use this object to specify details about the expression using the methods and properties of the QueryExpression Class.
Parameters
None.
Returns
A reference to a blank QueryExpression object.
Syntax
AddExpr2Field1(QueryRecordAlias, FieldName)
Description
Expression 2 has two field expressions because when the Between relational operator is used in a criteria, there can be two expression fields. The AddExpr2Field1 method returns a reference to a new QueryField object to be used as a field 1 for Expression 2. You can then use this object to specify details about the expression using the methods and properties of the QueryField Class.
Parameters
Field or Control |
Definition |
---|---|
QueryRecordAlias |
Specify the alias of the QueryRecord that contains the QueryField that you want to use. |
FieldName |
Specify the name of the QueryField in the QueryRecord that you want to use. |
Returns
A reference to a blank QueryField object.
Syntax
AddExpr2Field2(QueryRecordAlias, FieldName)
Description
Expression 2 has two field expressions because when the Between relational operator is used in a criteria, there can be two expression fields. The AddExpr2Field2 method returns a reference to a new a QueryField object to be used as a field 2 for Expression 2. You can then use this object to specify details about the expression using the methods and properties of the QueryField Class.
Parameters
Field or Control |
Definition |
---|---|
QueryRecordAlias |
Specify the alias of the QueryRecord that contains the QueryField that you want to use. |
FieldName |
Specify the name of the QueryField in the QueryRecord that you want to use. |
Returns
A reference to a blank QueryField object.
Syntax
AddExpr2List()
Description
Expression 2 can have a list of values when the Operator is of type In List (or Not In List). The AddExpr2List method returns a reference to a new QueryList, which can be used to add a list of values to the criteria.
Parameters
None.
Returns
A reference to a blank QueryList object.
Syntax
AddExpr2Subquery()
Description
The AddExpr2Subquery method is used to create a subquery for Expression2. This method returns a new QuerySelect object you can use to specify details about the new subquery.
Warning! The new subquery created with this method replaces any existing subquery (for this criteria), destroying any existing properties or values.
Parameters
None.
Returns
A reference to a new QuerySelect object.