<?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: Extract text box value in code</title><link>https://www.infopathdev.com:443/forums/thread/80134.aspx</link><pubDate>Tue, 03 Jul 2012 13:00:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80134</guid><dc:creator>Gennady Vanin (Геннадий Ванин, Новосибирск)</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80134.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=80134</wfw:commentRss><description>&lt;p&gt;Never mind, I found what Jimmy gave you:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;shep123:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Dim fieldValue
&lt;/p&gt;&lt;p&gt;Set fieldValue = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:productSelectionSection/my:productSelectionGroup/my:countGroup/my:trxCount)&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Extract text box value in code</title><link>https://www.infopathdev.com:443/forums/thread/80133.aspx</link><pubDate>Tue, 03 Jul 2012 12:52:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80133</guid><dc:creator>shep123</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80133.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=80133</wfw:commentRss><description>&lt;p&gt;It was in the code Jimmy gave me. Look at the the post below your original one.&lt;/p&gt;</description></item><item><title>Re: Extract text box value in code</title><link>https://www.infopathdev.com:443/forums/thread/80132.aspx</link><pubDate>Tue, 03 Jul 2012 12:48:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80132</guid><dc:creator>Gennady Vanin (Геннадий Ванин, Новосибирск)</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80132.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=80132</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;shep123:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;I got the code to work. I just had to remove the word Set&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;We have never had it in this thread &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Extract text box value in code</title><link>https://www.infopathdev.com:443/forums/thread/80131.aspx</link><pubDate>Tue, 03 Jul 2012 12:42:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80131</guid><dc:creator>Gennady Vanin (Геннадий Ванин, Новосибирск)</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80131.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=80131</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Jimmy:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;To access the field&amp;#39;s actual value, you&amp;#39;ll need to access the &lt;b&gt;text&lt;/b&gt; property:&lt;/div&gt;&lt;/BLOCKQUOTE&gt;
Isn&amp;#39;t it &lt;b&gt;value &lt;/b&gt;property in VBS?</description></item><item><title>Re: Extract text box value in code</title><link>https://www.infopathdev.com:443/forums/thread/80129.aspx</link><pubDate>Tue, 03 Jul 2012 12:25:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80129</guid><dc:creator>shep123</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80129.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=80129</wfw:commentRss><description>&lt;p&gt;I got the code to work. I just had to remove the word Set.&lt;/p&gt;</description></item><item><title>Re: Extract text box value in code</title><link>https://www.infopathdev.com:443/forums/thread/80126.aspx</link><pubDate>Tue, 03 Jul 2012 11:56:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80126</guid><dc:creator>shep123</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80126.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=80126</wfw:commentRss><description>&lt;p&gt;It apprears my issue, or at least 1 of them is with the set aspect. I started adding a single quotation to change parts to comments to find where the quote wasn&amp;#39;t executing and when the Set sequence becomes part of the code I get an error. I copied the XPath so I&amp;#39;m a bit baffled on where the issue is.&lt;/p&gt;</description></item><item><title>Re: Extract text box value in code</title><link>https://www.infopathdev.com:443/forums/thread/80124.aspx</link><pubDate>Tue, 03 Jul 2012 11:29:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80124</guid><dc:creator>shep123</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80124.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=80124</wfw:commentRss><description>&lt;p&gt;Just saw your post Jimmy. That helped in that I can actually open the preview. However, when it tries to execute I get an error in form code message. It may just be that my XPath is wrong but I attached the whole sequence anyway:&lt;br /&gt;&lt;br /&gt;Sub productSelectionNextButton_OnClick(eventObj) &lt;/p&gt;
&lt;p&gt;Dim fieldValue &lt;/p&gt;
&lt;p&gt;Set fieldValue = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:productSelectionSection/my:productSelectionGroup/my:countGroup/my:trxCount&amp;quot;).text &lt;/p&gt;
&lt;p&gt;If fieldValue =&amp;nbsp; &amp;quot;1&amp;quot; Then&amp;nbsp;&amp;nbsp; &amp;lt;----- I also tried without&amp;nbsp;quotations around the 1&amp;nbsp;&lt;br /&gt;x = MsgBox(&amp;quot;Prompt&amp;quot;, 1 , &amp;quot;Title&amp;quot;) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If x = 1 Then XDocument.View.SwitchView(&amp;quot;View 3&amp;quot;) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If &lt;br /&gt;Else XDocument.View.SwitchView(&amp;quot;View 3&amp;quot;) &lt;br /&gt;End If &lt;br /&gt;&lt;br /&gt;End Sub&lt;/p&gt;</description></item><item><title>Re: Extract text box value in code</title><link>https://www.infopathdev.com:443/forums/thread/80122.aspx</link><pubDate>Tue, 03 Jul 2012 11:19:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80122</guid><dc:creator>shep123</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80122.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=80122</wfw:commentRss><description>&lt;p&gt;&lt;span style="FONT-FAMILY:Arial;FONT-SIZE:10pt;"&gt;First, I have infopath 2003 so I don&amp;#39;t if that affects the code. Second, I can&amp;#39;t use VB, infopath only let me choose between Jscript and VBS. Third, I wanted to avoid and was advised against&amp;nbsp;using full trust since my company would have to worry about the certification every year. I know this makes it harder, which is why I&amp;#39;ve been struggling. I would also like to avoid using event handlers because I won&amp;#39;t be managing this after it is created and if someone needs to make a change I want it as simple as possible. If anyone has any ideas that would be great and if it isn&amp;#39;t really possible under these conditions that&amp;#39;s fine. I&amp;#39;ll just have to come up with a roundabout way of achieving the same result.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: Extract text box value in code</title><link>https://www.infopathdev.com:443/forums/thread/80121.aspx</link><pubDate>Tue, 03 Jul 2012 11:12:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80121</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80121.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=80121</wfw:commentRss><description>&lt;p&gt;Hello Shep,&lt;/p&gt;&lt;p&gt;&amp;nbsp;Firstly, it looks like you&amp;#39;re missing a closing quotation mark at the end of the XPath:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;......my:trxCount)&amp;nbsp;&amp;nbsp; --&amp;gt;&amp;nbsp;&amp;nbsp; ......my:trxCount&amp;quot;)&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Next, assuming that the XPath you have there is correct, that will return an actual object for that node.&amp;nbsp; To access the field&amp;#39;s actual value, you&amp;#39;ll need to access the &lt;strong&gt;text&lt;/strong&gt; property:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set fieldValue = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:productSelectionSection/my:productSelectionGroup/my:countGroup/my:trxCount&amp;quot;).text&lt;/p&gt;</description></item><item><title>Re: Extract text box value in code</title><link>https://www.infopathdev.com:443/forums/thread/80117.aspx</link><pubDate>Tue, 03 Jul 2012 08:52:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80117</guid><dc:creator>Gennady Vanin (Геннадий Ванин, Новосибирск)</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80117.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=80117</wfw:commentRss><description>&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;shep123:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;I am trying to write a string of code with vbs which will extract the value from a text box. I will ultimately run an if-then statement with that value (don&amp;#39;t think this actually matters but thought I&amp;#39;d put it in here). However, I am having trouble getting the code to actually reference the text box value. I attached the code below if anyone has any ideas. The trxCount text box is an equation that acts as a counter for the number of instances, thus it is an integer if that matters. Any help is appreciated.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Dim fieldValue&amp;nbsp;&lt;/p&gt;&lt;p&gt;Set fieldValue = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:productSelectionSection/my:productSelectionGroup/my:countGroup/my:trxCount)&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;span style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;float:none;"&gt;This should be really easy if&lt;/span&gt;&lt;span style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;float:none;"&gt;&amp;nbsp;to formulate and do WHAT you want instead of HOW&lt;/span&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;So, I&amp;#39;ve done it in Visual Basic or VB.NET 2.0 aka 2005, not sure why you gone fancy with VBS&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;Created an Infopath 2010 &amp;nbsp;client (Filler) form, place there TextBox and, in order to check the code. a button&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;In &amp;quot;&lt;b&gt;Form Options&lt;/b&gt;&amp;quot; (in backstage, having pressed File on ribbon) --&amp;gt; Security and Trust --&amp;gt; &amp;nbsp;I changed&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;Security Level&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;from&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;Domain&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;to&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;Full Trust&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;Having chosen a textbox, on ribbon clicked&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;Developer&lt;/b&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;and then&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;Changed Event&lt;/b&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;button&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;This quite helpfully answered you question by inserting into opened in VSTA InternalStartup() method the line:&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;ul&gt;&lt;li&gt;AddHandler EventManager.XmlEvents(&amp;quot;&lt;b&gt;/my:myFields/my:field1&lt;/b&gt;&amp;quot;).Changed, AddressOf field1_Changed&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;I declared your&amp;nbsp;fieldValue outside of methods&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;ul&gt;&lt;li&gt;Dim fieldValue As String&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;In generated&amp;nbsp;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;ul&gt;&lt;li&gt;Public Sub field1_Changed(ByVal sender As Object, ByVal&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;e As XmlEventArgs&lt;/b&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;I inserted (or rather chosen from Intellisense pop-up upon entering dot after parameter e)&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;ul&gt;&lt;li&gt;fieldValue = e.NewValue&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;That&amp;#39;s it&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;b&gt;Double-checking it&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;In generated from pressing in Infopath Designer 2010 &amp;quot;&lt;b&gt;Edit Form Code...&lt;/b&gt;&amp;quot; button in form&amp;#39;s button properties method&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;ul&gt;&lt;li&gt;Public Sub CTRL2_5_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;I inserted&amp;nbsp;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;ul&gt;&lt;li&gt;MessageBox.Show(fieldValue)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;For me it worked like a charm, though I do not even know VB.NET, I am a C#/ASP.NET guy!&lt;/div&gt;&lt;div style="font-family:arial;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;font-size:small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;</description></item><item><title>Extract text box value in code</title><link>https://www.infopathdev.com:443/forums/thread/80102.aspx</link><pubDate>Mon, 02 Jul 2012 19:22:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80102</guid><dc:creator>shep123</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80102.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=80102</wfw:commentRss><description>I am trying to write a string of code with vbs which will extract the value from a text box. I will ultimately run an if-then statement with that value (don&amp;#39;t think this actually matters but thought I&amp;#39;d put it in here). However, I am having trouble getting the code to actually reference the text box value. I attached the code below if anyone has any ideas. The trxCount text box is an equation that acts as a counter for the number of instances, thus it is an integer if that matters. Any help is appreciated.

Dim fieldValue
Set fieldValue = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:productSelectionSection/my:productSelectionGroup/my:countGroup/my:trxCount)</description></item></channel></rss>