12-14-2003, 08:15 AM
12-14-2003, 09:23 AM
Could you give us more information, but i might know what it is. When your using two different forms, you have to type things out differently. I'll use an example.
If theres another problem, let me know.
Code:
'Make Two forms called form1 and form2
'on form1, put a command button called command1 and a textbox called text1
'on form2, put a textbox called text1
'Then, put in the following code for command1 on the first form
Private Sub Command1_Click()
'This will take the text from text1 on form1 and put it
'in text1 on form2.
Form2.Text1.text = Form1.Text1.text
End Sub
If theres another problem, let me know.
12-14-2003, 11:11 AM
yup, thats what i wanted. i thinki got it for now.
12-14-2003, 07:12 PM
About what Mech said...
Both forms have to exist for that to work! If you've unloaded form1 by the time you get to form2, text1.text is already destroyed, i.e. inaccessable.
Both forms have to exist for that to work! If you've unloaded form1 by the time you get to form2, text1.text is already destroyed, i.e. inaccessable.
12-14-2003, 08:19 PM
Yeah, I forgot to mention that. you can use the Form.Hide function to hide the first form. either that or use form1.visible = false. but the first method is easier.
12-15-2003, 01:47 PM
Use:
or
If you don't know whether they're destroyed already.
Code:
Load Form1
Code:
Load Form2
12-18-2003, 08:07 PM
If you reference a control on a form that is unloaded, that form will be loaded automagically.