When the form is rendered , I have a text field that is Visible but wrapped in Hidden Subform. You cannot see it unitl you click of the button; Subform is Visible and you can enter data in the field. Works fine.
Can someone explain what happens when this field is prepopulated from database. The Subform that hold field is hidden. Is it going to show data when the form is rendered or you have to click on the button to see it?
When you populate the form from the database, visibility is never affected. Anything that is visible stays visible... anything hidden stays hidden.
What you can do is use a little formcalc to check if the field has a value, and if so, show the parent subform. This solution assumes that you don't have a hide button. If you do, you should change the hide/show buttons to a single checkbox, then check the checkbox 'srawvalue to see what state of visibility the subform should use.
code (put in the field in the hidden subform... under it's layout:ready event):