>The code you provided works fine, however the words EOF() and GO TOP are redundant. Most common error for scans not terminating is when you get to endscan, another table is selected so make sure the table you want scanned is selected before you hit the line including 'ENDSCAN'.
I don't agree here. While I used to believe this too, I saw that (at least in VFP 6, which I currently use), ENDSCAN automatically goes back to the original table. It does not, however, go back to the previous record - this may be the problem here.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)