Thank u Ernesto for the link you provided.
I've achived this by using custom code option. I used VSTA for this. Now the problem is when i'm publishing the infopath form 2007 to sharepoint sever 2010, its giving me the error like
"Infopath form cannot submit the form to webserver "http://............" make sure you have permissions to publish this form. Make sure you have logged on to this webbrowser.
please help me with this.
Thank u.