VS 2008,SQL 2005.
I have a form with a split container. The first panel has a tree control.On the 2nd panel I fill with a form at run time , If the first node is clicked I load a customer form in the panel. If the 2nd node is clicked I load a Job form.I also have it check to see if the form that is needed on the 2nd panel is already loaded,if so I want to just update the data. I am trying to refill the dataset on the form in the 2nd panel but the following code id not working.
frmSubCustomer.FillCustomerDetail(SelectedCustomerID) This is a sub on the frmSubCustomer
this is the code:
Private Sub FillsubCustomerForm()
Dim SubFrm As New frmSubCustomer
SelectedCustomerID = Me.TreeCustomer.SelectedNode.Tag
If Me.SplitContainer1.Panel2.Controls.Count > 0 Then
If Me.SplitContainer1.Panel2.Controls(0).Name = "frmSubCustomer" Then
.CurrentCustomerID = SelectedCustomerID
.TopLevel = False
.Dock = DockStyle.Fill
.WindowState = FormWindowState.Maximized
.Parent = Me
Any help would be great. If you can think of a better way of doing this I wold like to see it as I am just starting to develop this App