<?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: VBscript error for script on OnAfterChange Event</title><link>https://www.infopathdev.com:443/forums/thread/14264.aspx</link><pubDate>Fri, 27 Jan 2006 17:50:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14264</guid><dc:creator>cmenconi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14264.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14264</wfw:commentRss><description>Matt&lt;br /&gt;&lt;br /&gt;Thanks for the pointer,  I had read this artical prevously but Unfortunitly all of greg's examples are in jscript and I am working in vbscript and am having troubles adapting the concepts between the two</description></item><item><title>Re: VBscript error for script on OnAfterChange Event</title><link>https://www.infopathdev.com:443/forums/thread/14263.aspx</link><pubDate>Fri, 27 Jan 2006 17:24:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14263</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14263.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14263</wfw:commentRss><description>This code is causing an infinite loop.  When you use "objServerName.text = ucase(objServerName.text)" it calls the OnAfterChange event of that node (which is itself) and causes recursion.&lt;br /&gt;&lt;br /&gt;Greg Collins has written a HowTo on this issue, it can be found here:&lt;br /&lt;a target="_blank" href=http://infopathdev.com/howto/tips/default.aspx?i=3551199a23ac41f3a155b3a2ffc412c5&gt;http://infopathdev.com/howto/tips/default.aspx?i=3551199a23ac41f3a155b3a2ffc412c5&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You will use a boolean variable to indicate whether it is the code changing the value of the field or the user.&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>VBscript error for script on OnAfterChange Event</title><link>https://www.infopathdev.com:443/forums/thread/12759.aspx</link><pubDate>Fri, 27 Jan 2006 16:33:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12759</guid><dc:creator>cmenconi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12759.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12759</wfw:commentRss><description>I am having an issue with a vbscript set to run as a Data Validation script triggered by an OnAfterChange event.  &lt;br /&gt;&lt;br /&gt;The Error I get is &lt;font color="red"&gt;An error occurred in the form's code.  The number of calls to the OnAfterChange event for a single update in the data exceeded the maximum limit.&lt;/font id="red"&gt;&lt;br /&gt;&lt;br /&gt;I have found a few articals on this error but all of them pointed to jscript which I am unfamiliar with.&lt;br /&gt;&lt;br /&gt;&lt;font color="blue"&gt;&lt;br /&gt;Sub msoxd_my_txtServerName_OnAfterChange(eventObj)&lt;br /&gt;&lt;br /&gt;' Write code here to restore the global state.&lt;br /&gt;&lt;br /&gt;If eventObj.IsUndoRedo Then&lt;br /&gt;	' An undo or redo operation has occurred and the DOM is read-only.&lt;br /&gt;	Exit Sub&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;' A field change has occurred and the DOM is writable. Write code here to respond to the changes.&lt;br /&gt;Dim objServerName&lt;br /&gt;Set objServerName = XDocument.DOM.selectSingleNode("//my:myFields/my:txtServerName")&lt;br /&gt;objServerName.text = ucase(objServerName.text)&lt;br /&gt;End Sub&lt;br /&gt;&lt;/font id="blue"&gt;&lt;br /&gt;&lt;br /&gt;Any help would be much apperciated...  Thanks!</description></item></channel></rss>