borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Fill Web Form fields Automatically)Next Topic (Error uploading files) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Moving info to different forms
Poster Message
Nicholas
Level: Big Cheese

Registered: 31-08-2002
Posts: 22

icon Moving info to different forms

Hello everyone,

How can I move (carryover) input'ed textbox information from one form to another form when the user clicks on the 'OK' button I created?

Nicholas

22-08-2007 at 12:28 PM
View Profile Send Email to User Show All Posts | Quote Reply
admin
Level: Administrator


Registered: 04-04-2002
Posts: 530
icon Re: Moving info to different forms

please, try to explain what are you trying to do...do you have a form with a text box with some typed content and when the user presses the OK button you want this text to be loaded inside another form?...if so when you press the ok button you can move the text box value in a public variable declared public inside a module and then load it inside another textbox in another form at form Load event.

you can also pass the text value directly inside the other form, then unload the current form and show the other one

create a form named Form1 with a Text box named Text1 and a button named Command1, then add another form (form2) with a text box named Text2, then add this code to your command button, set your project startup form as form1

Private Sub Command1_Click()
    Form2.Text2.Text = Text1.Text
    Unload Me
    Form2.Show
End Sub


form1 will show up with a textbox, you enter text here and then when you press your button the entered text will be passed to the other textbox in the other form

____________________________
AndreaVB

22-08-2007 at 01:55 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Nicholas
Level: Big Cheese

Registered: 31-08-2002
Posts: 22
icon Re: Moving info to different forms

Thanks. I was messing around with it and figured it out
Nick

22-08-2007 at 02:15 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Moving info to different forms
Previous Topic (Fill Web Form fields Automatically)Next Topic (Error uploading files) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder