I am having a wiered problem with my infoPath form. The root of the problem is - When I try to add a new button and 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 "adding button event handler something something.." 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.
<InfoPathEventHandler(MatchPath:="TestButton", EventType:=InfoPathEventType.OnClick)> _
Public Sub TestButton_OnClick(ByVal e As DocActionEvent)
thisXDocument.UI.Alert("The SAVE button will be disabled because the form is READ ONLY (form already opened by another user)")
End Sub
I am using InfoPath 2007. Please help....
EDIT: The real problem is the form is not associated with the code anymore even though Tools-> Form Options-> Programming shows a vbproj attached to the InfoPath form. Anybody?? Please.....