>>Scan while !eof() for lines=1
lcCusnum=cuskey
lnOrdernum=orderno
lcCatkey=catkey
If lcCatkey="CON" and orderfl.orderno=lnOrdernum
Replace hold with .T. while invfl.orderno=lnOrdernum
Wait window;
"Replaced Hold with True as Requested for Customer # "+lcCusnum;
at 15,115 timeout 0.75
Skip -1
Endif
Endscan<<
Select your primary table before you issue the scan. After your replace statement select your primary table once mode. You don't need the while !eof(), Scan will exit upon the eof, and skip -1. Also, if you an index on invfl.orderno use the For clause.
thanks
oz