I am using infopath 2007, and vsta to enhance some forms. I am using vb
language. I am a beginner to infopath and I am confused. I have a text box
in my infopath form named: Time. The xpath for the text box is:
/dfs:myFields/my:Time. I am wanting to display the time in the text box upon
loading the form. I do not know how to refer to the text box so that I can
assign values or formatting to. THanks in advance.
Ramana - 28 Apr 2007 08:04 GMT
Hi,
First, you need to get the node using Xpath then assign time value to that
node.
XDocument.DOM.selectSingleNode("/dfs:myFields/my:Time").text=Time(I.e,Assign
the time you want display)
I hope this will help for you.

Signature
k.Ramana Reddy
http://www.autonomysystems.com
> I am using infopath 2007, and vsta to enhance some forms. I am using vb
> language. I am a beginner to infopath and I am confused. I have a text box
> in my infopath form named: Time. The xpath for the text box is:
> /dfs:myFields/my:Time. I am wanting to display the time in the text box upon
> loading the form. I do not know how to refer to the text box so that I can
> assign values or formatting to. THanks in advance.
S.Y.M. Wong-A-Ton - 30 Apr 2007 02:14 GMT
These two articles might help:
http://enterprise-solutions.swits.net/infopath2007/article.php?t=infopath-2007-f
requently-asked-questions-faq&c=infopath2007#how-to-set-field-value-from-code
http://enterprise-solutions.swits.net/infopath2003/article.php?t=date-time-basic
s-infopath&c=infopath2003
---
S.Y.M. Wong-A-Ton
> I am using infopath 2007, and vsta to enhance some forms. I am using vb
> language. I am a beginner to infopath and I am confused. I have a text box
> in my infopath form named: Time. The xpath for the text box is:
> /dfs:myFields/my:Time. I am wanting to display the time in the text box upon
> loading the form. I do not know how to refer to the text box so that I can
> assign values or formatting to. THanks in advance.