LOCATE FOR first_name == 'Steven' && Fails LOCATE FOR first_name == PADR('Steven',FSIZE('first_name','employee')) LOCATE FOR TRIM(first_name) == 'Steven' lcExact=set('exact') SET EXACT ON LOCATE FOR first_name = 'Steven' set exact &lcExactNext it would be better to divide search expression to multiple fields so it would be easier to build and you wouldn't need any type conversions if fields are not all chartype. Sampling your search regardless of 'set exact' :
*Sounds already all are char type LOCATE FOR ; mydbf.custnum == padr(myCustNum,fsize('custnum')) and ; mydbf.invnum == padr(myInvNum,fsize('invnum')) and ; mydbf.store == padr(myStore,fsize('store')) * padr() approach is safer than trim() because your memvars too might * have trailing spaces * If some types were not char - say invnum is integer LOCATE FOR ; mydbf.custnum == padr(myCustNum,fsize('custnum')) and ; mydbf.invnum == myInvNum and ; mydbf.store == padr(myStore,fsize('store'))Cetin