Avatar

Correct answer by
Level 10

The expression will be based on your structure .....this refers to the current object, parent  refers to the parent container of this object and index is the index of that object. So looking at your hierarchy and starting from the button you will need this.parent to get to the row subform that it is in (typically that is th esubform that is repeating). If that is in another subform you will need to add another parent. Continue down this path until you get to the repeating subform and then ask for its index. Your expression may look like this.parent.parent.parent.index. By using this.index you are getting the instance of the button object and there are only of those so that is why you are always getting 0.

Make sense?

BTW your form is not attached...so I cannot verify what you shoudl be putting in there.

Paul

View solution in original post