Hi,
Use below code to set the value or text for text box field.
XDocument.DOM.selectSingleNode("Xpath of text box field").text="value"
Example:
XDocument.DOM.selectSingleNode("/my:myFields/my:field1").text="xxxx"

Signature
k.Ramana Reddy
http://www.GGKtech.com
> How can I declare a certain text / value in a textbox that I created in an
> Infopath Form? Here is my current code wher I keep on getting an error
> "Reference to undeclared namespace prefixes: 'my'"
>
> Thanks