<?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: Set focus to the first field in a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/38855.aspx</link><pubDate>Tue, 24 Feb 2009 17:57:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38855</guid><dc:creator>martinpalmer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38855.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=38855</wfw:commentRss><description>&lt;p&gt;Ok... So an update to this.&amp;nbsp; It also fires when I add a new row to the table and I would rather it didn&amp;#39;t do that.&amp;nbsp; Any ideas would be helpful.&amp;nbsp; Would it be better to do this validation in the validation event?&lt;/p&gt;</description></item><item><title>Set focus to the first field in a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/38854.aspx</link><pubDate>Tue, 24 Feb 2009 17:00:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38854</guid><dc:creator>martinpalmer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38854.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=38854</wfw:commentRss><description>&lt;p&gt;All, &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have a repeating table (group2_44).&amp;nbsp; The first field must be exactly 7 characters long.&amp;nbsp; How do I data validate this length?&amp;nbsp; If it is not 7 characters in length, I need to have a pop-up and return the focus to the first cell in the row.&lt;/p&gt;
&lt;p&gt;Here is what U have so far but its not working.&amp;nbsp; It pops up the warning but does not return the user to the first column of the row.&amp;nbsp; if I take up the View statement, the pop-up shows but the Text is on the next field.&lt;/p&gt;
&lt;p&gt;Sub msoxd_my_Prefix_OnAfterChange(eventObj)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; If eventObj.IsUndoRedo Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub&lt;br /&gt;&amp;nbsp;&amp;nbsp; End If&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; empid = eventObj.Site.text&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (len(empid) &amp;lt; 7) then &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.UI.Alert(&amp;quot;Please enter the Employee ID Including the Prefix.&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.View.selectsingleNode(eventObj.Site, Type.Missing)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit sub&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item></channel></rss>