Save your old code in a txt file. After that go to Form Options, select Programming, choose to Remove Code. Then select C# (InfoPath 2003 Compatible) and paste into the new generated code the functions you saved into the txt file. Be careful with 2 things:
1) do this if you are absolutely sure you have a MOSS 2003 environment where you are publishing your form!
2) a part of your code is possible not to work anymore due to InfoPath 2003 lack of functions.
