Ok sorry I misunderstood your first post , I think you have a problem on the "preview".
I can suggest to make a copy of your code and form (Just in case ...), after that you can copy your codes. Try to remove your code files (with infopath ) and create a new one. Paste your copy and try it.
I hope your problem would be solved.