<?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: Button Click Event Wiring</title><link>https://www.infopathdev.com:443/forums/thread/46651.aspx</link><pubDate>Fri, 04 Sep 2009 22:15:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46651</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46651.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=46651</wfw:commentRss><description>&lt;p&gt;Perhaps make a copy of the actual code file and put it away someplace safe, then in InfoPath, under Tools / Form Options / Programming, click the remove code button. Then, after the code has been removed, try adding code to your button again, see if the event handler is generated in VSTA. If so, your problem is solved, and you have the copy of your code that you can paste into your new code file. If the event handler is not generated, you may need to run a repair on InfoPath...&lt;/p&gt;</description></item><item><title>Button Click Event Wiring</title><link>https://www.infopathdev.com:443/forums/thread/46567.aspx</link><pubDate>Thu, 03 Sep 2009 15:31:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46567</guid><dc:creator>sandeep_1</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46567.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=46567</wfw:commentRss><description>&lt;p&gt;I am having a wiered problem with my infoPath form.&amp;nbsp;The root of the problem is - When I try to add a new button and&amp;nbsp;wire up the event with the code behind(vb.net), the form is not recognizing that there is a code that needs get run when a button is clicked. Additionally, when Edit Form Code is clicked on button properties, it shows message that &amp;quot;adding button event handler something something..&amp;quot; but nothing happens. So I decided to hand-code the event in my vb.net project (Code below). But apparently it is not recognizing that there is this code.&lt;br /&gt;&lt;br /&gt;&lt;font size="2"&gt;&amp;lt;InfoPathEventHandler(MatchPath:=&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;TestButton&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, EventType:=InfoPathEventType.OnClick)&amp;gt; _&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; TestButton_OnClick(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; DocActionEvent)&lt;br /&gt;thisXDocument.UI.Alert(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;The SAVE button will be disabled because the form is READ ONLY (form already opened by another user)&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;I am using InfoPath 2007. Please help....&lt;/p&gt;
&lt;p&gt;EDIT: The real problem is the form is not associated with the code anymore even though Tools-&amp;gt; Form Options-&amp;gt; Programming shows a vbproj attached to the InfoPath form. Anybody?? Please.....&lt;/p&gt;</description></item></channel></rss>