>>>>>Hi everybody,
>>>>>
>>>>If I understood correctly:
>>>>
>>>>local laCount(1)
>>>>select count(*) from childTable where condition matching filter command into array laCount
>>>>
>>>>if laCount(1) > 0 then there are matching records
>>>>
>>>
>>>I think using select-sql was not a way for me, but I just added COUNT FOR condition in the SetFilter() method of the form and it worked well.
>>
>>But you did not want to (or preferred not to) move the pointer, something that COUNT FOR will do.
>
>Yes, that's true. But I have LOCATE command after COUNT is done, so everything seems to be OK.
If you would add an index to the cursor or table in the bottom grid, you could use SET KEY TO instead of SET FILTER for the best speed. If the cursor is at EOF in the bottom grid, there are no matching records to validate.