First thing you need to do is rename your fields and subforms. Spaces and puntuation have special meanings In any language. You can't use them in a name. Names should also be compact and meaningful, you might be typing them a few times.
Next, your codes uses the LiveCycle Scripting model, but you mention the Action, Format, and Validate tabs. These are parts of AcroForm Field properties dialog. So you must have an AcroForm. If that's the case then you need to change the code to match the AcroForm Model.
The source for PDF Scripting Info pdfscripting.com
The Console Window (Video tutorial)
The Console Window(article)
Having trouble, Why Doesn't my Script Work