<?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: programmatically changing the view of a form from a different form</title><link>https://www.infopathdev.com:443/forums/thread/74161.aspx</link><pubDate>Tue, 17 Jan 2012 23:00:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74161</guid><dc:creator>gr8fasushi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74161.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=74161</wfw:commentRss><description>&lt;p&gt;thank you!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;this pointed me in the general direction.&amp;nbsp; I ended up passing a value into a ghost text box on the 2nd form, and on load, based on that value, it opened up the view I needed.&amp;nbsp; Thanks for your help.&amp;nbsp; Here was my solution for others with the same problem - I&amp;#39;m using VB.NET&lt;/p&gt;
&lt;p&gt;dim path as string = &amp;quot;insert path&amp;quot;&lt;/p&gt;
&lt;p&gt;dim newForm as XmlForm = Application.XmlForms.NewFromFormTemplate(path)&lt;/p&gt;
&lt;p&gt;dim nav as XPathNavigator = newForm.MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;insert xpath&amp;quot;, newForm.NameSpaceManager)&lt;/p&gt;
&lt;p&gt;nav.SetValue(1)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;on the 2nd form on the Load event, it checks the value of the text box, if it&amp;#39;s 1, then change views.&lt;/p&gt;</description></item><item><title>Re: programmatically changing the view of a form from a different form</title><link>https://www.infopathdev.com:443/forums/thread/74153.aspx</link><pubDate>Tue, 17 Jan 2012 22:01:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74153</guid><dc:creator>Anson Hidajat</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74153.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=74153</wfw:commentRss><description>&lt;p&gt;You&amp;#39;ll need to pass in some input parameters into your other&amp;nbsp;form.&amp;nbsp; Your other form will then read the parameter and open the correct view based on what that value is.&amp;nbsp; There is a blog post that describes this in more detail:&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/infopath/archive/2007/02/26/passing-data-into-a-form-input-parameters.aspx"&gt;http://blogs.msdn.com/b/infopath/archive/2007/02/26/passing-data-into-a-form-input-parameters.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Alternatively, qRules lets you do this easily with the GetInputParameter and SetDefaultView.&amp;nbsp;&amp;nbsp;More info on qRules: &lt;a href="http://www.qdabra.com/en/products/qRules_overview.aspx"&gt;http://www.qdabra.com/en/products/qRules_overview.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>programmatically changing the view of a form from a different form</title><link>https://www.infopathdev.com:443/forums/thread/74052.aspx</link><pubDate>Tue, 17 Jan 2012 17:37:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74052</guid><dc:creator>gr8fasushi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74052.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=74052</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi guys,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;ve tried searching the forums but I couldn&amp;#39;t find anything related to what I need.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;For specific reasons, I need to change the view of a form from code.&amp;nbsp; Specifically, I want to open a different form with a specific view from another form.&amp;nbsp; I have the code running to open a different form through code:&lt;/p&gt;&lt;p&gt;Dim Proc As New System.Diagnostics.Process&lt;br /&gt;Dim path As String = &amp;quot;{path directory}&amp;quot;&lt;br /&gt;Proc.StartInfo.WorkingDirectory = path&lt;br /&gt;Proc.StartInfo.FileName = &amp;quot;eQI form.xsn&amp;quot;&lt;br /&gt;Proc.Start()&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;this opens the form, I just need to change the view on that open form and I&amp;#39;m having a pickle of a time finding a solution.&amp;nbsp; I can find code to change the view for the current form, but not for changing the view of a different form that&amp;#39;s also open.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Do you guys know of the coding syntax to do so?&amp;nbsp; Thanks for your help in advance!&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>