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 / February 2007

Tip: Looking for answers? Try searching our database.

Helppppp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hector - 31 Jan 2007 00:07 GMT
HI all,
Need to populate fields using VB (code behind).

field1:
ID bound to a datasource called datas1

field2:
ID bound to datasource2 called datas2

field3:
Yr bound to datasource2 called datas2

The field2(same as field1) and 3 are populated once field1 has been found on
XXX table.

I know I can use rules and actions based on value changed of field1 to
populate field2 but I also have some other tables that are queried based on
the values of fields2 and field3. Basically, I am creating schedules for
students using the student's ID and School year.

How can I read the values of field1 from vb.net and how can I set the values
for field2 and field3?
I can read some of the values using the follwing:

Dim root, user2 As System.Xml.XPath.XPathNavigator
           root = Me.MainDataSource.CreateNavigator
           user2 =
root.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:GetProfile/tns:Studentid", Me.NamespaceManager)
           'user =
root.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:Getsyears/tns:studentid", Me.NamespaceManager)
MessageBox.Show(user2.ToString)

I think my problem is in how to read the nodes(query fields) using different
datasources.
S.Y.M. Wong-A-Ton - 06 Feb 2007 09:32 GMT
Take a look at
http://enterprise-solutions.swits.net/infopath2007/article.php?t=infopath-2007-f
requently-asked-questions-faq&c=infopath2007


You use data sources the same way as the MainDataSource and can retrieve
datas1 with

DataSources("datas1")
---
S.Y.M. Wong-A-Ton

> HI all,
> Need to populate fields using VB (code behind).
[quoted text clipped - 30 lines]
> I think my problem is in how to read the nodes(query fields) using different
> datasources.
 
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.