>I thought SET ORDER TO contextid was the action. But maybe there needs to be more action. Like SCAN... ENDSCAN or something. When I type those same commands directly into the command window and then browse the table, it is resequenced, but if I run this .PRG and browse the table, it is not resequenced.
But you're closing the table right after SET ORDER TO contextid. What do you want to acomplish with this code?
--sb--