<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Selectively Ignoring XmlEvent ChangedEvent (Insert/Delete Operation) - InfoPath 2007</title><link>https://www.infopathdev.com:443/forums/thread/81239.aspx</link><pubDate>Wed, 01 Aug 2012 23:38:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:81239</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/81239.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=81239</wfw:commentRss><description>&lt;p&gt;Hi - this shouldn&amp;#39;t require code - just a simple count formula. Are you counting the choice groups? Or the repeating group? Maybe attach a screenshot of your schema under the Options tab in a reply and tell me what you are trying to count.&lt;/p&gt;</description></item><item><title>Selectively Ignoring XmlEvent ChangedEvent (Insert/Delete Operation) - InfoPath 2007</title><link>https://www.infopathdev.com:443/forums/thread/81197.aspx</link><pubDate>Wed, 01 Aug 2012 03:38:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:81197</guid><dc:creator>senecalakemonster</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/81197.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=81197</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve developed a form based on an XML schema.&amp;nbsp; The schema contains a number of elements that are replacements for the head of a substitution group (resulting in a choice group in the form).&amp;nbsp; The hierarchy of elements in the schema results in this choice group being located within a repeating section.&amp;nbsp; One of the things I&amp;#39;m trying to accomplish via VBA is to maintain a count of the number of these repeating sections that are in the form (i.e., the number of instances of the underlying element).&amp;nbsp; &lt;/p&gt;&lt;p&gt;I thought I was on the correct path by attaching a changed event handler to the element that corresponds to the repeating section.&amp;nbsp; I can increment or decrement a count attribute upon insertion or deletion operations of one of these repeating sections.&amp;nbsp; Unfortunately, if I change the choice section in the aforementioned choice group, it also causes my event handler for the higher level element/repeating section to run.&amp;nbsp; This also seems to qualify as an insertion operation on the repeating section, and it causes my count to become incorrect.&amp;nbsp; &lt;/p&gt;&lt;p&gt;I&amp;#39;ve read about event bubbling, event object sites and sources, DataDOM OnAfterChange, and so on, but either I can&amp;#39;t figure out how to use the proper VBA APIs to change my count only when it&amp;#39;s appropriate (and ignoring it otherwise) or I can&amp;#39;t do this in InfoPath 2007 or with the form I have based on the schema.&amp;nbsp; I&amp;#39;ve seen examples of creating event handlers, but the only thing I see available for my form&amp;#39;s fields are the Changing, Changed, and Validating Events.&amp;nbsp; The arguments to these functions are of type Object and XMLEventArgs (ByVal sender As Object, ByVal e As XMLEventArgs).&amp;nbsp; I don&amp;#39;t see how I&amp;#39;d filter out the &amp;quot;false positive&amp;quot; insertion events, as I don&amp;#39;t seem to have a way to compare the site and the source.&amp;nbsp; Is there a way to accomplish what I&amp;#39;m trying to do?&lt;/p&gt;&lt;p&gt;Thank you. &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>