FOUND( ) Function

Example   See Also

Returns true (.T.) if CONTINUE, FIND, INDEXSEEK( ), LOCATE, or SEEK is successful.

Syntax

FOUND([nWorkArea | cTableAlias])

Returns

Logical

Arguments

nWorkArea

Specifies the work area of the table for which FOUND( ) returns a value indicating the success of the last CONTINUE, FIND, INDEXSEEK( ), LOCATE, or SEEK.

FOUND( ) returns false (.F.) if a table isn't open in the work area you specify.

cTableAlias

Specifies the alias of the table for which FOUND( ) returns a value indicating the success of the last CONTINUE, FIND, INDEXSEEK( ), LOCATE, or SEEK.

Visual FoxPro generates an error message if you specify a table alias that doesn't exist.

Remarks

FOUND( ) returns a logical value that indicates whether the most recently executed CONTINUE, FIND, INDEXSEEK( ), LOCATE, or SEEK was successful, or if the record pointer was moved in a related table. FOUND( ) returns true (.T.) if the search is successful; otherwise FOUND( ) returns false (.F.).

If you omit the optional arguments, FOUND( ) returns a value indicating the success of the last CONTINUE, FIND, INDEXSEEK( ), LOCATE, or SEEK for the table open in the currently selected work area.

Tip   This function can be used to determine if a child table has a record that matches the parent record.