I am trying to use information from one form on another form. Using the following code, the information actually appears in the text box on the second form but when I try to display the contents in a message box, it shows as empty. Any ideas?
FIRST FORM
Private Sub cmdSiblings_Click()
frmSiblings.lblName.Caption = lblName.Caption
frmSiblings.txtPersonID.Text = Me.txtPersonID.Text
frmSiblings.Show
Me.Hide
End Sub
SECOND FORM
Private Sub Form_Load()
Set mobjPerson = New CPerson
Set mobjParents = New CParents
Set mobjChild = New CChild
Set mobjSpouse = New CSpouse
MsgBox txtPersonID.Text
End Sub
FIRST FORM
Private Sub cmdSiblings_Click()
frmSiblings.lblName.Caption = lblName.Caption
frmSiblings.txtPersonID.Text = Me.txtPersonID.Text
frmSiblings.Show
Me.Hide
End Sub
SECOND FORM
Private Sub Form_Load()
Set mobjPerson = New CPerson
Set mobjParents = New CParents
Set mobjChild = New CChild
Set mobjSpouse = New CSpouse
MsgBox txtPersonID.Text
End Sub