Click here to Skip to main content
15,893,190 members

Communication between forms

San Dra asked:

Open original thread
Please help me, I have a project and have 3 form, form 1 is for name and lastname, form 2 is for school and university, form 3 is to display all the data ..How can i display data from textbox1 in form 1 and form 2 to form 3??



Look Guys ..
To make my problem clear
I have two forms..

Form 1: 1 textbox and 1 button ( button don't show the name that user enter in txtbox but open form 2)

Form 2: 1 txtbox and button, (in txtbox form 1 user enter name) in this txtbox form 2 the user enter his lastname...The button will show a msgbox wich show up the name and lastname..


how can i do it?


I tried like thi: but it doesn't work out :/

VB
Private Sub Command1_Click()
Static name As Integer
Static lastname As Integer
firstname = txtFirstName.Text
LastName = txtLastName.Text
txtFirstName.Text = Form1.txtFirstName.Text
txtLastName.Text = Form2.txtLastName.Text

both = (Form1.txtFirstName.Text " & & " Form2.txtLastName.Text)
MsgBox (both)

End Sub
Tags: Visual Basic (Visual Basic 10), Visual Studio 2012

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900