If you want us to test this, you'll have to post a working script. As posted, that script simply will not work. There is no form created in that script, in fact the KiXforms object is not created.