Hi Paul,Sorry to say that, i am not using instance manager to create subfroms, the about code only removes that instance.I have each 10 subforms inbuilt, i mean to say only one will be visible at a time and needs a script to remove the contents.I found that xfa.host.resetData(fieldnames)can achieve ...