use customer cFieldList = exclude("contact,company") ? cFieldList select &cFieldList from customer function exclude lparameters cExcludelist dimension aExclude[1] nWords = WordArray(upper(cExcludelist),@aExclude) cFields = "" for ix = 1 to fcount() lInlist = .f. for kx = 1 to nWords if field(ix) == aExclude[kx] lInlist = .t. exit endif endfor if !lInlist cFields = cFields + ; iif(empty(cFields),"",",")+; field(ix) endif endfor return cFields function WordArray parameters cWordList, aWordArray && Comma delimited word list, array that words will be placed oDummy = createobject("Listbox") with oDummy .RowSourceType = 1 .RowSource = cWordList dimension aWordArray[.listcount] for ix = 1 to .listcount aWordArray[ix] = .list(ix) endfor endwith release oDummy return alen(aWordArray)Cetin