35 pts.
 Trouble with Event Handler
I can get a msgbox to display sCurAccountno but I can't asign sCurAccountno as the text value for Textbox1. So this works:
Public Class Form1
    Dim WithEvents oRecObj As New GoldMine.RecObj

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        AddHandler oRecObj.RecordObjectHasChanged, AddressOf ContactChanged
    End Sub

    Sub ContactChanged(ByVal sCurAccountNo As String) Handles oRecObj.RecordObjectHasChanged
       msgbox(sCurAccountNo)
    End Sub
End Class
And this does NOT work:
Public Class Form1
    Dim WithEvents oRecObj As New GoldMine.RecObj

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        AddHandler oRecObj.RecordObjectHasChanged, AddressOf ContactChanged
    End Sub

    Sub ContactChanged(ByVal sCurAccountNo As String) Handles oRecObj.RecordObjectHasChanged
        TextBox1.Text = sCurAccountno
    End Sub
End Class


Software/Hardware used:
ASKED: December 23, 2008  8:49 PM
UPDATED: December 27, 2008  6:19 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

What did you need answered?

 27,310 pts.