<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Button that sets textbox value to current time on click</title><link>https://www.infopathdev.com:443/forums/thread/55059.aspx</link><pubDate>Wed, 19 May 2010 16:15:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55059</guid><dc:creator>rtree</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55059.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55059</wfw:commentRss><description>&lt;p&gt;Perfect! Thank you sir!&lt;/p&gt;</description></item><item><title>Re: Button that sets textbox value to current time on click</title><link>https://www.infopathdev.com:443/forums/thread/55040.aspx</link><pubDate>Wed, 19 May 2010 12:57:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55040</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55040.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55040</wfw:commentRss><description>&lt;p&gt;on button click create a rule to set the value of the field to now(), instead of doing the same through code&lt;/p&gt;</description></item><item><title>Re: Button that sets textbox value to current time on click</title><link>https://www.infopathdev.com:443/forums/thread/55033.aspx</link><pubDate>Wed, 19 May 2010 10:28:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55033</guid><dc:creator>rtree</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55033.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55033</wfw:commentRss><description>&lt;p&gt;Thanks for the reply,  I could use Now() for when the form is opened but not when they finish completing the form.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;I forgot to mention that I have two fields (start and finish) that need to be populated with the time.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This is for a maintenance check sheet. The maintenance supervisors do not want the technicians to write in times earlier than the present time.&lt;/p&gt;&lt;p&gt;The button is to save the user time since not all of them type quickly. My fall back plan if I can&amp;#39;t get the button to work is to try field validation rules and have them type in the date and time. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Button that sets textbox value to current time on click</title><link>https://www.infopathdev.com:443/forums/thread/55023.aspx</link><pubDate>Wed, 19 May 2010 08:35:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55023</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55023.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55023</wfw:commentRss><description>&lt;p&gt;why dont you use rules instead and set the value of the field to now()&lt;/p&gt;</description></item><item><title>Button that sets textbox value to current time on click</title><link>https://www.infopathdev.com:443/forums/thread/54954.aspx</link><pubDate>Mon, 17 May 2010 18:17:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54954</guid><dc:creator>rtree</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54954.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=54954</wfw:commentRss><description>&lt;p&gt;Greetings, I am new to Infopath and jscript. I don&amp;#39;t have much code writing experience other than some VBA in Excel and Access.&lt;/p&gt;
&lt;p&gt;I would like to create a button that sets a textbox (bound to Access) to the current time and date. I am using the 2003 versions of Infopath and Access.&lt;/p&gt;
&lt;p&gt;I have pieced together some bits and pieces based on what I read&amp;nbsp;in other posts:&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Code&amp;nbsp;after the button is clicked&lt;/u&gt;:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;function cmdStartTime::OnClick(eventObj)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.DOM.selectSingleNode(&amp;quot;my:myFields/my:dataFields/my:PM_History/my:Start_Time&amp;quot;).text = Now(); &lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;u&gt;I have linked to an MS Access database, and my data source tree to reach the field I want to change&amp;nbsp;looks like&lt;/u&gt;:&lt;/p&gt;
&lt;p&gt;myFields&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;dataFields&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;d:PM_History&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Start_Time&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If someone could nudge me in the right direction, I would greatly appreciate it!&lt;/p&gt;</description></item></channel></rss>