1 Reply Latest reply on May 13, 2010 4:59 AM by pguerett

    Making subforms visible/invisible

    Bernie_Hansen

      Hi from a newbie!  I'm having a problem that I can't find described exactly in previous threads:  I have a drop-down (wrapped in a subform), whose visible/hidden status depends on the choice selected within a 'master' drop-down enabled with this formcalc script that runs on the local machine:

       

      form1.Firstpage.CatSubcat.CATEGORY::change - (FormCalc, client)

      if (CATEGORY == "A-B/FLUID/LYTES")

      then SUBCATEGORY.SUBCATEGORY.presence = "hidden"

      elseif (CATEGORY == "ANES/ANALGESIA")

      then SUBCATEGORY.SUBCATEGORY.presence = "hidden"

      elseif (CATEGORY == "ENVIRONMENT/TOXIC")

      then SUBCATEGORY.SUBCATEGORY.presence = "hidden"

      elseif (CATEGORY == "NUTRITION")

      then SUBCATEGORY.SUBCATEGORY.presence = "hidden"

      elseif (CATEGORY == "SEPSIS/SIRS/MODS")

      then SUBCATEGORY.SUBCATEGORY.presence = "hidden"

      elseif (CATEGORY == "SHOCK/ISCHEMIA/CPCR")

      then SUBCATEGORY.SUBCATEGORY.presence = "hidden"

      else SUBCATEGORY.SUBCATEGORY.presence ="visible"

      endif

      When the form is opened the 'slave' dropdown is hidden (as intended), but it requires two consecutive selections within the 'master' dropdown to effect a change in its status in either direction.  I suspect I'm missing a simple line required to reset the form but can't figure it out.  Any help will be most welcome!