johnadonaldson
Well-known member
- Joined
- Nov 9, 2005
- Messages
- 48
- Programming Experience
- 10+
I have a couple of USER CONTROLS that I have textboxes on. I want to send text to these textboxs from the main form. I have it set up as follows
MainForm
Private fOpGen As New GenReg1 '<- user control form
If sDone = "00" Then
Me.TextBox2.Text = "Test1"
fOpGen.TextBox1.Text = "Test1"
fOpGen.Label24.Visible = True
EndIf
If sDone = "01" Then
Me.TextBox2.Text = "Test2"
fOpGen.Label25.Visible = True
fOpGen.TextBox2.Text = "Test2"
EndIf
It does not work. I do not see any text show up in the textbox on the user control. Neither do I see the label associated with the textbox go visible.
I know the code is working as I see the Me.TextBox2.Text display correctly.
MainForm
Private fOpGen As New GenReg1 '<- user control form
If sDone = "00" Then
Me.TextBox2.Text = "Test1"
fOpGen.TextBox1.Text = "Test1"
fOpGen.Label24.Visible = True
EndIf
If sDone = "01" Then
Me.TextBox2.Text = "Test2"
fOpGen.Label25.Visible = True
fOpGen.TextBox2.Text = "Test2"
EndIf
It does not work. I do not see any text show up in the textbox on the user control. Neither do I see the label associated with the textbox go visible.
I know the code is working as I see the Me.TextBox2.Text display correctly.