<?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: MsgBox displays twice?</title><link>https://www.infopathdev.com:443/forums/thread/22459.aspx</link><pubDate>Tue, 21 Aug 2007 09:36:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22459</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22459.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=22459</wfw:commentRss><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;These events are fires two times. One is eventObj operation is equal to ‘Delete’ and ‘Insert’. For these type of twice calling method eliminates we have to add one condition as shown below: &lt;/p&gt;
&lt;p&gt;if(eventObj.Operation != “Insert”) &lt;/p&gt;
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt;return; &lt;/p&gt;
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;Hope this help you &lt;/p&gt;</description></item><item><title>MsgBox displays twice?</title><link>https://www.infopathdev.com:443/forums/thread/21532.aspx</link><pubDate>Fri, 06 Jul 2007 23:25:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21532</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21532.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=21532</wfw:commentRss><description>&lt;p&gt;Hi:&lt;/p&gt;&lt;p&gt;I have a little custom code (vbscript) for an OnValidate event. It looks like this:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Sub msoxd__IssueReportingDev_DetailedDescription_attr_OnValidate(eventObj)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim detDesc&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; detDesc = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/d:IssueReportingDev/@DetailedDescription&amp;quot;).text&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if len(detDesc)&amp;gt;=5000 then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dim msg&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg = MsgBox(&amp;quot;This field cannot contain more than 5,000 characters. You currently have &amp;quot; &amp;amp; formatnumber(len(detDesc),0) &amp;amp; &amp;quot; characters. Please revise your entry.&amp;quot;,16,&amp;quot;Detailed Description is too long&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/p&gt;&lt;p&gt;End Sub&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;When I preview the form (or fill out the published version) if I put more than 5,000 characters in the field, my message box pops up nicely. I can click OK and go back into my field and revise my entry. However, if still have more than 5,000 characters and tab or click out of the field, my message box pops up (expected behavior), I click OK, and it pops up a second time. I have to click OK again before it goes away and lets me revise my field. Is it my if statement? Or something else? Oh, I am designing in IP 2007 but the people using this will be using IP 2003. Thank you for any help/ideas!&lt;/p&gt;&lt;p&gt;Hilary&lt;/p&gt;</description></item></channel></rss>