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 / March 2006

Tip: Looking for answers? Try searching our database.

Back and Forward appear to work, but don't

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 23 Mar 2006 03:02 GMT
Hi

I've used the instructions from
http://enterprise-solutions.swits.net/infopath/sequential-db-table-record-naviga
tion.htm

to add Back and Forward buttons to my form, and they appear to work
properly. You can cycle through the records, and they update onscreen.
However, if you try to read one of the fields from code*, InfoPath
thinks that it's still on the first record.

I've done a little investigation, and it appears that the full
recordset is being loaded, and that the Back and Forward buttons are
only operating at the visual level. The code underneath is still
looking at the first record, presumably because I haven't told it to
move to the next one. How do I get my code to look at the same record
that the user is seeing?

Thanks
Chris

*For example:
PhotoID =
XDocument.DOM.selectSingleNode("//dfs:dataFields/d:tblPHOTO_CATALOG/@PHO_photo_id").text
Chris - 23 Mar 2006 04:31 GMT
OK, I figured it out:

PhotoID =
XDocument.DOM.selectSingleNode("//dfs:dataFields/d:tblPHOTO_CATALOG[position()
= x]/@PHO_photo_id").text

You substitute the record number for x in [position() = x] so that it
knows which record to look at :)

Chris
 
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.