Is there a simple way to know when i click a button in a subform which subform instance of the button was clicked?
What i mean is like: if this clicked button is on instance 3 of the subform then do something related to instance 3.
I am close to completing a form but an oversight created more issues and knowing which instance is being clicked would mean i could continue working the same way, or if i have to try something different.
Not quite what i was after, but did give me an idea for something else. I have been able to look at my form in a different way and have decided to go another direction without needing to identify the button being clicked.
When you reference a form object by name in your code it will try and match it against the siblings, then it will work it's way up the form structure until it matches an object of that name.
So, if your parent subform is called something like Row1, this in the button click event which can be in as many subforms below Row1 you can use Row1.index to return instance number, it is zero based so the third instance will return 2.