Thanks Patrick for your contribution.
My form is based on SQL Server and Infopath forces me to use the data structure that it generates. This data structure is built on attributes so I don't have a choice.
This is just a particular case. What I wanted to know is the way to navigate through the same line in a repeating table. I continued reading and experimenting and finally I made it work. This is the code that does it:
it is triggered after I select a date in the date picker of the column @Day in the repeating table, and after calculating the week of the year, it writes it on the column @WeekOfYear of the same line.
SUB msoxd__ItemLines_Day_attr_OnAfterChange(eventObj)
DIM fWeekOfYear
DIM day
day = eventObj.Site.text
SET fWeekOfYear = eventObj.Site.selectSingleNode("../@WeekOfYear") ' This is the key to navigate to another column in the same line
fWeekOfYear.text = DatePart("ww", day, vbMonday, vbFirstFullWeek) ' Calculation of the week of the year and writing it in other column
END SUB
Josera