Lparameters tcSearchString, tcExtension >> >>lcDir = getdir("","Where files are located?") >>If empty(lcDir) >> Return >>Endif >> >>Create cursor flist (scxname c(30), fieldname c(20), recnumber i) >>Select 0 >>=adir(aFormfiles,lcDir+"*."+tcExtension) >>For fcnt = 1 to alen(aFormfiles,1) >> Use (lcDir+aFormfiles[fcnt,1]) alias current >> Scan >> For ix = 1 to fcount("current") >> If type(field(ix,"current"))$"CM" ; >> and atc(tcSearchString, eval(field(ix,"current")))>0 >> Insert into flist values ; >> (aFormfiles[fcnt,1], field(ix, "current"), recno("Current")) >> Endif >> Endfor >> Endscan >> Use >>Endfor >>Select flist >>On key label "F2" do EditTarget >>Go top >>Brow >>On key label "F2" >> >>Function EditTarget >> Use (lcDir+trim(flist.scxname)) in 0 alias EdtSCX >> Go flist.recnumber in "EdtSCX" >> Select EdtSCX >> Wait window nowait "Field name is : "+(trim(flist.fieldname)) >> Browse >> Use >> Select flistCetin