Pass a Value to a Child Form


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I select a record in my parent table with a browse dialog. I then click an edit button to load a child form using a childformdialog.
That all works fine. I am trying to pass the name field from my contestantsbo to my child form just for information on my child form by putting the name in a label on my child form.
This is the code I am using on my parent form.

   Private Sub btneditdata_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btneditdata.Click
        'Me.ChildFormDialog1.ShowDialog()
        Dim frm As childform = New childform
        frm._cnames = Me._cname

        If Me.ChildFormDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK Then
            SrswtdPointsBO1.Save()
        Else
            SrswtdPointsBO1.Undo(MicroFour.StrataFrame.Business.BusinessUndoType.AllRows)
        End If
    End Sub

    Private ReadOnly Property _cname() As String
        Get
            Return Me.ContestantsBO1.InvertedName
        End Get
    End Property

This is the code I am using on my child form.


    Friend WriteOnly Property _cnames() As String
        Set(ByVal value As String)
            Label6.Text = value
        End Set
    End Property

I put a break point on this line Label6.Text = value and 'value' has the exact info I want to display But it does not show up on the label on my form.

Please see attached picture of my child form.
Attachments
childform.PNG (90 views, 36.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search