Jerald_Ferguson@adobeforums.com wrote:
> Button 1:
> xfa.form.form1.SF4.acts.actsFields.actDescTitles.actDescFields.instanceManager.addInstance(true);
>
> Button 2:
> xfa.form.form1.SF4.acts.actsFields.instanceManager.addInstance(true);
Each time you click on either button, you are adding new instances of
the subforms. The statements above have no way of knowing which subform
you wish to reference. For example, the third actsFields subform would
have a som expression of xfa.form.form1.SF4.acts.actsFields[2]. In your
case, you are not using an index, so it is always referencing the first
subform.
The best way to go in this case is to use a "relative path" to get to
the subform for Button 1. Assuming you have a Button 1 inside of each
actsFields subform, you would use the following code:
this.parent.actDescTitles.actDescFields.instanceManager.addInstance(true);
Justin Klei
Cardinal Solutions
www.cardinalsolutions.com