I can get subforms to hide or be invisible using the change event and presence function. However, what I want to be able to do is click on a button which validates my form and then only displays the subform once validation is accepted (i.e. ivar = 0 but not if ivar = 1) I have tried lots of things but cant get anything to work on this. Does anyone have any suggestions?
This works fine if it is the only click event, however if there is a code prior to this where you have two conditions (0,1) then it does not seem to work. I know the code before it is correct as immeditaely before thisan if (iVar == 0) statement works correctly so I am not sure what the problem is.
I had a play around with the form to send you an abbriveated example and I sort of got it to work (one page document and subform set to hidden). On button click it would then display the hidden subform. When I applied the code again to the whole form it did not work so I have been trying to get it working again for my own learning.
Eventually, in the full form with multiple pages I changed the subform so that it is initially invisible and hey presto it now works.
Is there any explanation for that? When looking at documents on web it did not really indicate that this shoudl matter.