I have a section that includes a text box, a few drop down boxes and 4 buttons. This entire section is repeated when one of those four buttons "add" is selected. The forms drops down to make room for the new section.
You can do this as many times as needed. And each new section has the same 4 buttons. Two relevant ones are "add" and "remove" the section.
The issue I'm having is that when you select the "remove" button in ANY of the new (or original) sections, it only removes the original section (or first one if you keep selecting it). The action for that button is set to remove "current instance". If I change to the other options "first instance" "last instance" or instance #, it completes that correctly. But "current instance" always removes the first instance.
I'm thinking the issue might be in how the "add" section includes the buttons themselves.
Any thoughts on what I could do differently or what the issue might be?
This remove button should remove the subform where the button is clicked. I have had a problem like described as well. This code works for me, but have found when i have had problems i changed this.parent.index to this.sf.index and it worked as desired.