how to reset subform after changing vendor no.

Hi, In the gate entry form if an open entry is already present , than also if change the vendor no than the vendor no is selected without any warning message or change in line.plz suggest how can i update the subform or reset it. i want that subform should be blank after selecting another Vendor no.



On Selection of sepearte vendor no u can delete the lines from subform /table using document no as common field