Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27569

VS 2012 Passing Data from one Form to another

$
0
0
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

Viewing all articles
Browse latest Browse all 27569

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>