Calculate(calcOperation)
Returns a calculated field based on this field. This field must belong to the Query::Fields collection and must not be the calculated one. The created calculated field is added to the Query::Fields collection. The name of the calculated field is formed from the name of this field and a suffix reflecting a calculating operation.
Visible non-calculated query fields divide query records into groups upon which values of calculated fields are formed. Total values on the field are formed on the basis of all query records. Total values for calculated fields built on external database tables or queries are calculated if the Recordset::CalcTotals property returns True. A query containing calculated fields consists of pseudo-records reflecting calculation results on groups of genuine records. A calculating operation is determined by the calcOperation constant. Descriptions of calculating operation constants are given in the "Calculating operations" table.
Not all external databases support the possibility to create calculated fields. Use the ExternalDatabase::SupportCalculations property to check this possibility. You can always create calculated fields for queries based on GDB tables. It is impossible to use this method if a query is based on an SQL statement SELECT.