I have one form that I can call from two different forms. I need to identify the calling form. I was trying to pass a string to accomplish this; however, Nothing is being passed.
Calling Form:
Private Sub Button2_Click(Sender As Object, e As EventArgs) Handles Button2.Click
If Me.txtLoadID.Text = "" Then
MessageBox.Show("Error")
Else
Export.Show
Export.TransloadID = CType(Me.txtLoadID.Text, Long)
Export.Scrn = "Dash"
End If
Called Form:
Public Class Export
Public TransLoadID As New Long
Public Scrn As String
Private Sub Form1_Load(Sender As Object, e As EventArgs) Handles MyBase.Load
If Scrn = "Dash" Then
Me.LoadIDTextBox.Text = DashBoard.txtLoadID.Text
TransLoadID = DashBoard.txtLoadID.Text
Else
Me.LoadIDTextBox.Text = Transport.txtLoadID.Text
TransLoadID = Transport.txtLoadID.Text
End If
Calling Form:
Private Sub Button2_Click(Sender As Object, e As EventArgs) Handles Button2.Click
If Me.txtLoadID.Text = "" Then
MessageBox.Show("Error")
Else
Export.Show
Export.TransloadID = CType(Me.txtLoadID.Text, Long)
Export.Scrn = "Dash"
End If
Called Form:
Public Class Export
Public TransLoadID As New Long
Public Scrn As String
Private Sub Form1_Load(Sender As Object, e As EventArgs) Handles MyBase.Load
If Scrn = "Dash" Then
Me.LoadIDTextBox.Text = DashBoard.txtLoadID.Text
TransLoadID = DashBoard.txtLoadID.Text
Else
Me.LoadIDTextBox.Text = Transport.txtLoadID.Text
TransLoadID = Transport.txtLoadID.Text
End If