*-- Have an index on these two fields: INDEX ON EMPTY (InsCommand) TAG E_InsCmd INDEX ON SearchTB TAG SearchTB SET ORDER TO LOCATE ; FOR SearchTB = m.lcSearch AND NOT EMPTY (InsCommand) ; WHILE !plErrorIf I understood correctly the use of plError. It looks like a parameter, but if this is the case, I can't imagine what does it have to do with the condition...