>>It's a little difficult to tell without comments and knowing what the properties are, but if the overlapping is happening in the child table, I check out what's happening with the line:
>>
>
>delete for empty(&llink)
>
>
>this delete all recs wich gets somehow the key empty wich does not relate to parent
>
>the overlaping are happening in parent table
>
>ldatamaster - is alias of parent table
>ldataslave - alias of child table
>llink - field name common to two tables, key and foreign
Ok, then the next thing I'd check is to make sure the following lines are not causing the record pointer on the parent to move:
Thisform.refreshform()
Thisform.pageframe1.page1.gridslave.SetFocus()
Thisform.pageframe1.page1.gridslave.ActivateCellThisform.pageframe1.page1.gridslave.ActiveRow,1)