I've never needed quotes before, and like I said the script obviously runs because the xfa.host.messageBox statement works.So it's something in the form that is preventing the script from setting the presence property of the subform. Perhaps something is scrambled in the XML, which I would be useles...