Try this,
****
Do case
case Recstatus='A'
Append Blank
Repl vcode with mvcode
Repl input with minput, instage with minstage,output with moutput, outstage with moutstage
case Recstatus = 'E'
Sele mos_in_output
seek minput+minstage+moutput+moutstage
if found()
Repl vcode with mvcode
Repl input with minput, instage with minstage,output with moutput, outstage with moutstage
else
=messagebox("Search not found!",0,"Error!")
endif
endcase
***
check your -> seek minput+minstage+moutput+moutstage
i think this returns FOUND()=.f. thats why your replace applied to the 1st record
Ronski