IF .NOT. EMPTY(consig) && If this variable contains Company name
consig = ALLTRIM(consig)
cWhere = cWhere = cWhere + IIF(lAnd," AND ","") + "globalnew.Company LIKE '%"+consig+"%'"&& Add ' before first & after second %
lAnd = .t.
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller The only thing normal about database guys is their tables.