Hi dipester
I used your code and it works well in Infopath filler but when I published it as a sharepoint list, field can not store any value.
any suggestion?
Edited:
I found the solution here:
http://www.infopathdev.com/forums/p/23564/81737.aspx