0

newbie wanna ask... please help

let say i have a form, in this form i make a menu, if i click it, it will show a form, mini form (sub form), in this form i put a textboxt and a button, the textboxt contain some value and changeable, if i push the button, this mini form will close and the value in it will use in the main form, how can i do this?

thanks for the help...

3
Contributors
3
Replies
15
Views
4 Years
Discussion Span
Last Post by rishif2
0
Form1.Text1.Text = Form2.Text1.Text

Unload Me

''Form1 is your main form, form2 is the form where you get the data from. After you have the data, close the form...
0

thanks for reply,

if i want the previous value appear in textboxt (in form2) after i click the menu from form 1 to show that form (form 2), and if the button clicked in form 2, the data automatically send to form 1 and form 2 will closing, how i can do that?

0

try this
declare public type string variable at module

Public oldstr As String

now On Sub Form (Form2)

Private Sub Command1_Click()
oldstr = Form2.Text1.Text
Form1.Text1.Text = oldstr
Unload Form2
End Sub


Private Sub Form_Load()
If oldstr <> "" Then
Form2.Text1.Text = oldstr
End If
End Sub

hope this helps you . . .

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.