<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Switch View during OnLoad</title><link>https://www.infopathdev.com:443/forums/thread/13606.aspx</link><pubDate>Fri, 16 Sep 2005 19:55:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13606</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13606.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13606</wfw:commentRss><description>If there wasn't good with the bad what fun would life be? :)&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Switch View during OnLoad</title><link>https://www.infopathdev.com:443/forums/thread/13605.aspx</link><pubDate>Thu, 15 Sep 2005 14:04:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13605</guid><dc:creator>drobins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13605.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13605</wfw:commentRss><description>But if i learn everything that means more responsibility. HAHAHAHA&lt;br /&gt;&lt;br /&gt;but if this project takes off...means more security for me...good with the bad i guess hahahaha</description></item><item><title>Re: Switch View during OnLoad</title><link>https://www.infopathdev.com:443/forums/thread/13604.aspx</link><pubDate>Thu, 15 Sep 2005 06:07:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13604</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13604.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13604</wfw:commentRss><description>Because you want to learn everything?&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Switch View during OnLoad</title><link>https://www.infopathdev.com:443/forums/thread/13603.aspx</link><pubDate>Wed, 14 Sep 2005 15:34:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13603</guid><dc:creator>drobins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13603.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13603</wfw:commentRss><description>got this cleared up!&lt;br /&gt;&lt;br /&gt;instead of trying to do this with code, I realized i could use rules for the open/save of the document.&lt;br /&gt;&lt;br /&gt;why do i insist of tyring things the hard way first.</description></item><item><title>Re: Switch View during OnLoad</title><link>https://www.infopathdev.com:443/forums/thread/13602.aspx</link><pubDate>Wed, 14 Sep 2005 14:37:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13602</guid><dc:creator>drobins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13602.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13602</wfw:commentRss><description>i'm not sure i understand this.&lt;br /&gt;&lt;br /&gt;The name of my view is "2".&lt;br /&gt;&lt;br /&gt;so to switch to that view in the onload i can't use the actual name of the view?&lt;br /&gt;How do i refer to the view then?</description></item><item><title>Re: Switch View during OnLoad</title><link>https://www.infopathdev.com:443/forums/thread/13601.aspx</link><pubDate>Wed, 14 Sep 2005 14:26:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13601</guid><dc:creator>drobins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13601.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13601</wfw:commentRss><description>2 is the name of the view. I have tried changing it to viewb but it doesn't seem to work either</description></item><item><title>Re: Switch View during OnLoad</title><link>https://www.infopathdev.com:443/forums/thread/13600.aspx</link><pubDate>Wed, 14 Sep 2005 14:20:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13600</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13600.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13600</wfw:commentRss><description>Is "2" the name of your view?  You do not reference a view by an index if that is what you are trying to do.&lt;br /&gt;&lt;br /&gt;---Directly from help-------------&lt;br /&gt;SwitchView Method&lt;br /&gt;Changes the active view of a Microsoft Office InfoPath 2003 form to a specified view.&lt;br /&gt;&lt;br /&gt;expression.SwitchView(ByVal bstrName As String)&lt;br /&gt;expression    Required. An expression that returns a reference to the View object.&lt;br /&gt;&lt;br /&gt;bstrName Required String. The name of the view to switch to. If an empty string is used, the default view is displayed.&lt;br /&gt;&lt;br /&gt;Security Level&lt;br /&gt;2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.&lt;br /&gt;&lt;br /&gt;Remarks&lt;br /&gt;&lt;br /&gt;If an empty string is used as the bstrName parameter, the view is changed to the default view of the form.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;In the following example, the SwitchView method of the View object is used to change the current view to the default view:&lt;br /&gt;&lt;br /&gt;XDocument.View.SwitchView("");&lt;br /&gt;&lt;br /&gt;------------------------&lt;br /&gt;</description></item><item><title>Switch View during OnLoad</title><link>https://www.infopathdev.com:443/forums/thread/12567.aspx</link><pubDate>Wed, 14 Sep 2005 14:02:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12567</guid><dc:creator>drobins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12567.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12567</wfw:commentRss><description>Is this possible. I can't seem to get it working. Here is my code:&lt;br /&gt;&lt;br /&gt;Sub XDocument_OnLoad(eventObj)&lt;br /&gt;&lt;br /&gt;if XDocument.DOM.selectSingleNode("//my:myFields/my:field9").text = "true" then&lt;br /&gt;XDocument.View.SwitchView("2")&lt;br /&gt;end if&lt;br /&gt;&lt;br /&gt;End Sub</description></item></channel></rss>