I had an issue getting data beck from a popup form and was assisted with a solution from Stevoni (thanks again). It has led to another problem however. In trying to send data to the popup I have over loaded the constructor to get the new data across. It appears in the debugger however that when the Friends With Events line (line1 below) is hit it triggers the standard constructor and the form is instantiated with the default constructor (no data passed). Here is where the code goes wonky.
(on the Parent Form)
Friend WithEvents CAddress As frmClientAddress
Sub ShowMyChildForm(ByVal CID As String)
CAddress = New frmClientAddress(CID)
CAddress.Show()
End Sub
When stepping in with the debugger before it reached the first line of the sub it jumps to this part of the child form.
(on the child form)
Public Sub New()
MyBase.New()
Dim FormAction As String = "Add"
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
And where I want go, from inside the sub, is:
(on the child form)
Public Sub New(ByVal AddressID As String)
InitializeComponent()
FormAction = "Edit"
CAddID = AddressID
End Sub
Is there a wat to get this to work properly?