lparameters lcString if vartype(lcString) <> 'C' return -1 endif local llFound, lnI, lnRec for lnI = 1 to fcount() && assuming table is open in the current workarea if inlist(type(field(lnI)), 'C', 'M') lcField = FIELD(lnI) locate for lower(lcString) $lower(&lcField) if not eof() llFound = .t. exit endif endif endfor lnRec = 0 if llFound lnRec = RecNo() endif return lnRec