<?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>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Dynamic months</title><link>https://www.infopathdev.com:443/forums/thread/56173.aspx</link><pubDate>Thu, 24 Jun 2010 11:19:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:56173</guid><dc:creator>Sam Spritzer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/56173.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=56173</wfw:commentRss><description>&lt;p&gt;Thanks so much, mgarant.&amp;nbsp; I was afraid I would have to resort to code.&amp;nbsp; So now, I am thinking of a function that allows me to do this but defining a field as where&amp;nbsp;can specify month plus 1.&lt;/p&gt;</description></item><item><title>Re: Dynamic months</title><link>https://www.infopathdev.com:443/forums/thread/56163.aspx</link><pubDate>Wed, 23 Jun 2010 21:12:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:56163</guid><dc:creator>mgarant</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/56163.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=56163</wfw:commentRss><description>&lt;p&gt;I don&amp;#39;t know if there is a way without code for this, but if you&amp;#39;re willing to do this with code, here is an exemple :&lt;/p&gt;
&lt;p&gt;First create an On_Load event (if you do not want this to be on form load, then any other event will work too)&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the &amp;quot;code&amp;quot; you should be using in the event :&lt;/p&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;
&lt;p&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; root = MainDataSource.CreateNavigator(); &lt;/font&gt;&lt;br /&gt;DateTime todaysDate = DateTime.Today.ToString(&amp;quot;d&amp;quot;); &lt;br /&gt;Int day = todaysDate.Day; &lt;br /&gt;Int Month = todaysDate.Month; &lt;br /&gt;Int Year = todaysDate.Year; &lt;br /&gt;for each column you want to populate &lt;br /&gt;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month++; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DateTime newDate = New DateTime(day, Month, Year); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; root.SelectSingleNode(&amp;quot;your filed&amp;quot;, Namespacemanager).SetValue(newDate.ToString()); &lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Notice this is not the exact code to use, but it will be somehow like that. This is&amp;nbsp;an algorithm.&lt;/p&gt;
&lt;p&gt;Hope this help!&lt;/p&gt;</description></item><item><title>Dynamic months</title><link>https://www.infopathdev.com:443/forums/thread/56153.aspx</link><pubDate>Wed, 23 Jun 2010 15:14:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:56153</guid><dc:creator>Sam Spritzer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/56153.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=56153</wfw:commentRss><description>&lt;p&gt;I have an Infopath (2007, SP2) form that looks like a spreadsheet.&amp;nbsp; It is designed to allow users to enter number of hours across the spreadsheet.&amp;nbsp; Each column represents a month and there will be up to 24 months.&amp;nbsp; I have been looking high and low for any rules or logic which will allow me to display&amp;nbsp;today() as mm/yy and then increment each column by one mm/yy.&amp;nbsp; I am not an experienced InfoPath programmer by any stretch of the imagination so I am considering this as part of my learning experience.&amp;nbsp; Thanks in advance.&lt;/p&gt;</description></item></channel></rss>