It depends on how you want to display your sub form. Do you want to display it as a result of a button click? If so, you could put your code into the button click event handler:
Private Sub _showSubFormButton_Click(sender As System.Object, e As System.EventArgs) Handles _showSubFormButton.Click
Dim frmChild = New SubForm
If frmChild.ShowDialog = DialogResult.OK Then
MessageBox.Show("Customer ID: " & frmChild.CustomerID)
End If
End Sub