Case alltrim(curResult.tablename)=='icitem' Select 0 Use (curResult.tablename) ** find the original item If seek(lcolditemno,'icitem', 'xitemno') lnrecpointer=recno('icitem') ** see if the new item exists already If not seek(lcnewitemno,'icitem', 'xitemno') ** if the new item doesn't exist already, *go back to the original, and **change the old to the new Goto lnrecpointer in icitem *** got error message here on this replace. I have *** looked at this code a million times, and ** can not figure out how it could fail ** unless the seek failed when it really should not **have Replace icitem.citemno with lcnewitemno in icitem Else Wait wind 'Item ' + lcnewitemno + ; ' already exists in icitem ' + chr(13) + ; 'Item ' + lcolditemno + ' will be ' + ; ' replaced with ' + lcnewitemno + ; ' in transaction detail lines, and ' + lcolditemno + ; ' will be deleted from the icitem table ' nowait Goto lnrecpointer in icitem Delete in icitem Endif Else Wait wind 'Error: original item not found in change list - skipping ' nowait Endif Use in icitem