|
-
February 13th, 2000, 02:48 PM
#1
Not Shure
I have two forms Form1 and Form2 I need to know how to get info in text1 on form1 to go to text1 on form2 when command1 on form1 is clicked
Thanks in Advance
Donny S.
-
February 13th, 2000, 04:01 PM
#2
Re: Not Shure
command1_click()
text1 = form2.text1
end sub
-
February 13th, 2000, 05:21 PM
#3
Re: Not Shure
Form2.Text1.Text = Form1.Text1.Text
-
February 13th, 2000, 07:45 PM
#4
Re: Not Shure
I can't get the code you gave me to work i must be doing something wrong is there more you can tell me or show me. 
Thanks in Advance
Donny S.
-
February 13th, 2000, 10:05 PM
#5
Re: Not Shure
Make 2 forms, on form1 add a texbox, and on form2 add a textbox. On form1 add a command button, double click the command button which will take you to the code window where you will see
private Sub Command1_Click()
End Sub
add following line
Form2.Text1.Text = Form1.Text1.Text
so it will look like this
private Sub Command1_Click()
Form2.Text1.Text = Form1.Text1.Text
End Sub
now double click on Form1 and add this line inside this code
private Sub Form_Load()
End Sub
add this lines between those above so it will look like this
private Sub Form_Load()
Text1.Text = "Hello"
Form2.Show
End Sub
run the project and press command1, look onto form2's textbox, it should get the string "Hello" after command1 had been pressed
Good Luck with your programming, you can read free book at www.informit.com, if you want to get started with VB 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|