What is the difference between the OnSave event for a form based on a set and the OnSaveRecord event field rule for the set.

This is my scenario:

The set is:

Parent
child
grandchild
child
child (parent as alias)
child


When a record for the parent file is saved, I need to:

Test for control data record
If not there, create it and create backup record
if there, update it and update the backup record

If fieldA on the parent record = .T.
Then write a record to an external table

If fieldB on the parent record = .T.
Then write a record to an external table

If flag on parent record and conditions of control data = .T.
Then write a record to an external file

Which is the event from which I should run the script?

I currently run the script from the OnSave event of the form. The problem is that it wants to loop 2-4 times before ending. It acts like it is trying to run the script for each record that is being saved on the form.

Thanks,
Jerry Gray