>I changed the line to :
> Scan For PID=ARTrn.ID.And.!EoF() NoOptimize
> Delete Next 1
> EndScan
>
>(I realize that I do not need the !Eof() clause it is a habit from the pre-scan days of FoxPro.)
>
>Since I have made that change to turn off the optimization I
>have not received a C5 error in 17days and counting. Previously
>I would see some every week.
Hmmm. You could have some minor index corruption. Have you tried deleting all your indexes and recreating them from scratch? If you have RI set up, this will cancel it, so you might want to look into using Stonefield Database Toolkit.