Question:

Quick question, MS Visual Basic 2008 Express Edition...

by  |  earlier

0 LIKES UnLike

I have two different forms

I have textboxes, in both forms...

Heres what I want to do...

"One the Second Form"

form1.textbox1.text = form2.texbox1.text

So they don't have to enter there name more than once...

Can you help, it wont show up, in the second form, but will show up in the first form, after I enter the name in the second form... lol, crazy right...

WTF, ...

Can you help...?

Ace says thanx...

 Tags:

   Report

1 ANSWERS


  1. According to the code you have given:

    form1.textbox1.text = form2.texbox1.text

    you are entering data on the second form and having it show in the textbox on the first form...here's what you need: Cut and paste this code into the code panes...enjoy...I am running this in2008xp right now and it works just the way you want it. Remember its a TextBox_TextChanged event that makes it happen.

    Form2.vb code......

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

            Form1.TextBox1.Text = TextBox1.Text

        End Sub

    Form1.vb code.....

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

            TextBox1.Text = Form2.TextBox1.Text

        End Sub

    When you type in the textbox on form2 the data is displayed in the textbox on form1 automattically. If you want it the other way around then change the arguments on each forms subroutine.

    : )

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.