Reset Button









I am currently working on a form, and have almost completed it. I decided I wanted to put a reset button on the form but am having some problems with it. I have a few different radio buttons that when clicked have textfields or labels apperaing, so I've had to add in code to ensure those fields are hidden when the form resets.

here is the code ive used in the click event:



//reset form data;

     subfrmApplicationForm.subfrmPrvMbCoverage.txtPrevHealthNbr.presence = "hidden";  

     subfrmPrevIntlAdr.presence = "hidden";

     subfrmPrevCdnAdr.presence = "hidden";

     subfrmDischarge.presence = "hidden";

     subfrmAddSpouse.presence = "hidden";

     subfrmSpouse.presence = "hidden";

     subfrmAddSpouse.txtSpouseResides.presence = "hidden";

     subfrmChildren.presence = "hidden";

     subfrmMailingAdd.presence = "hidden";

     subfrmSkMailAdd.presence = "hidden";

     subfrmAddress.SkMailBtn.presence = "hidden";

     subfrmAddress.lblSkMail.presence = "hidden";

     subfrmResidence.lblRes.presence = "hidden";

     subfrmResidence.dteDepart.presence = "hidden";

     subfrmCertification.specifyother.presence = "hidden";

     _subfrmChildren.setInstances(0); // remove all instances




if i fill out the entire form, then try the reset button, everything resets, and the visible sections become hidden like they are suppose to.

If i just check the radio buttons that open 'subfrmMailingAdd, subfrmSkMailAdd,lblRes, dteDepart, specifyother' and then click reset, the radio buttons will reset, but the fields that should end up hidden stay visible. i figured out that if i dont click on a specific button in another part of the form (which opens a new subform) then the info from the remainder of the form does not reset.

Does anyone have any ideas why this would happen?

Thank you in advance.