Hi J,
InfoPath 2003 and InfoPath 2007 use different object models. You can't just copy snippets of code from one to the other and expect it to work. Now, your InfoPath 2003 code will work in InfoPath 2007 assuming the project is not set up to use the new object model. Of course, new projects set up to use the IP2007 OM won't work at all on IP2003. Forwards compat works but only if you don't mix and match the OMs. Hope this helps!