Help regarding deleting records from subform

Help regarding deleting records from subform

Hello

I need some help.

I have created a main form named "Shipping" and two sub forms "Shipping and Billing" and "product Info".

I have created a relationship between these forms by assigning a ID at the form load in main form  and assign the same id to sub form as well. 

When I add the record in product info sub form it works fine and on delete it is also work fine and on success it show a page with these information correctly.

But when I edit the same record and add or delete product from there and submit the form then it is not working. It is showing last product which i had added or deleted. 

Please tell me how it works for sub form as well.