Click here to Skip to main content
15,886,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi everyone
i want send data from third form t second form

codes lıke this

i open my first from
then open second form
then third
first codes
Private Sub YeniHareket_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles YeniHareket.Click 
        Dim f As New F_CariKayıt 
        f.ShowDialog()
    End Sub


second form codes
Private Sub CARIARA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CARIARA.Click
        Dim FRM As New F_CariList
        FRM.FORMNO.Text = 3
        FRM.ShowDialog()
    End Sub


third codes
Sub detayformagonder() 
            F_CariKayıt.CARKOD3.Text = CARI_TABLO.Rows(CARI_TABLO.CurrentCell.RowIndex).Cells(0).Value
            F_CariKayıt.UNVAN_CEK() 
        End If
        ' Me.Close()
    End Sub


What I have tried:

i wrote in my question
<pre>Sub detayformagonder() 
            F_CariKayıt.CARKOD3.Text = CARI_TABLO.Rows(CARI_TABLO.CurrentCell.RowIndex).Cells(0).Value
            F_CariKayıt.UNVAN_CEK() 
        End If
        ' Me.Close()
    End Sub
Posted
Updated 25-Apr-20 23:06pm

You can make a public variable in any of your forms and it will be available in the others.

VB
'Form2 code

Public MyVar as string = ""


VB
'Form1 code

Dim f as new form2
f.MyVar = "Whatever"



It's not really clear where you are stuck, but hope this helps
 
Share this answer
 
Comments
Member 14588284 26-Apr-20 4:12am    
Sub detayformagonder() 
            F_CariKayıt.CARKOD3.Text = CARI_TABLO.Rows(CARI_TABLO.CurrentCell.RowIndex).Cells(0).Value
            F_CariKayıt.UNVAN_CEK() 
        End If
        ' Me.Close()
    End Sub


in this code i cant send form2
not working.

F_CariKayıt.CARKOD3.Text is null
i didnt think its very simple like this

is solved my problem

Private Sub CARIARA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CARIARA.Click
        Dim FRM As New F_CariList
        FRM.FORMNO.Text = 3
        FRM.ShowDialog()
 CARKOD3.Text = FRM.Rows(FRM.CurrentCell.RowIndex).Cells(0).Value
             UNVAN_CEK() 

    End Sub


only i close form3
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900