>SET SAFETY OFF >SET STEP ON >SELECT LXPOS >GOTO TOP >SCAN WHILE ! EOF() >rpl = '' >drpl = '' >rpl = ALLTRIM(LXPOS.XDATA) &&The Actual Data >drpl = ALLTRIM(LXPOS.XFIELD) && The table and field I am trying to replace >REPLACE &drpl WITH &rpl >ENDSCANI just did it again! I again updated your reply when I should have posted mine as a separate reply.
lcFieldToReplace = justext(alltrim(LxsPos.xField)) lcTable = juststem(alltrim(LxsPos.xField)) replace (m.lFieldToReplace) with rpl in (m.lcTable)