Do I think this is something that ought to go into EOF proper? Not really. But the original poster was looking for a way to automatically fix his PK sequences and so I'm giving him the outline of how he could do this. He may decide (and I would if I were him) that ultimately it's cheaper to remind yourself to update the PK sequence if you make changes outside of EOF.