ATC( ) Function

Example   See Also

Returns the beginning numeric position of the first occurrence of a character expression or memo field within another character expression or memo field, without regard for the case of these two expressions.

Syntax

ATC(cSearchExpression, cExpressionSearched [, nOccurrence])

Returns

Numeric

Arguments

cSearchExpression

Specifies the character expression that ATC( ) searches for in cExpressionSearched.

cExpressionSearched

Specifies the character expression cSearchExpression searches for.

Both cSearchExpression and cExpressionSearched can be memo fields of any size.

nOccurrence

Specifies which occurrence (first, second, third, and so on) of cSearchExpression is searched for in cExpressionSearched. By default, ATC( ) searches for the first occurrence of cSearchExpression (nOccurrence = 1). Including nOccurrence lets you search for additional occurrences of cSearchExpression in cExpressionSearched.

Remarks

ATC( ) searches the second character expression for the occurrence of the first character expression, without concern for the case (upper or lower) of the characters in either expression. Use AT( ) to perform a case-sensitive search.

ATC( ) returns an integer corresponding to the position where the first character of the character expression is found. If the character expression isn't found, ATC( ) returns 0.