954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

is it possible to passing text box value from one form to another

is it possible to pass the value of a text box and the caption of a label from one form to another

swapna7999
Junior Poster in Training
84 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

Hi,

Write this Code in Main Form:

Form2.Show
Form2.txtNew.Text = Me.Text1.Text
Form2.lblNew.Caption = Me.Label1.Caption


Regards
Veena

QVeen72
Posting Shark
950 posts since Nov 2006
Reputation Points: 84
Solved Threads: 143
 

everything is possible. In vb 6 you can direct access value from another form of any control (example is done by veena) but in .net you will find encapsulated form.

Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

i got another solution

just call

Form1.Text1.Text

from Form2 to access the value of Text1 in the form Form1

swapna7999
Junior Poster in Training
84 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You