Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / April 2007

Tip: Looking for answers? Try searching our database.

Referring to text boxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
wvrider - 27 Apr 2007 20:10 GMT
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.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.