473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Text field on another form

If I have Form1 with a text field called Text1 on it, and I want to put
information into that field from a second Form (Form2) how would I do it?

I would have thought there would have been a way to just type
Form1.Text1.text = "this is a test", but that does not work.

Thank you.
Nov 20 '05 #1
4 1051
"Michael Murschell" <mm********@gonelco.com> schrieb
If I have Form1 with a text field called Text1 on it, and I want to
put information into that field from a second Form (Form2) how would
I do it?

I would have thought there would have been a way to just type
Form1.Text1.text = "this is a test", but that does not work.


Hmmm..... where did you declare a variable named Form1?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
I'm sorry, am I suppose to declare it (a form). It is the form that opens
with the program.

"Armin Zingler" <az*******@freenet.de> wrote in message
news:uk**************@TK2MSFTNGP10.phx.gbl...
"Michael Murschell" <mm********@gonelco.com> schrieb
If I have Form1 with a text field called Text1 on it, and I want to
put information into that field from a second Form (Form2) how would
I do it?

I would have thought there would have been a way to just type
Form1.Text1.text = "this is a test", but that does not work.


Hmmm..... where did you declare a variable named Form1?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
* "Michael Murschell" <mm********@gonelco.com> scripsit:
If I have Form1 with a text field called Text1 on it, and I want to put
information into that field from a second Form (Form2) how would I do it?

I would have thought there would have been a way to just type
Form1.Text1.text = "this is a test", but that does not work.


If you show the 2nd form using 'foo.ShowDialog(Me)' you can use
something like this:

\\\
DirectCast(Me.Owner, Form1).TextBox1.Text = "Foo"
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
"Michael Murschell" <mm********@gonelco.com> schrieb
I'm sorry, am I suppose to declare it (a form). It is the form that
opens with the program.


Oh, I see. Pass "Me" (without the quotes) to the second form. Used in the
first Form, it is the reference to itself. The second Form can use the
reference to access the textbox.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Dave B | last post by:
Does anyone know of a program that will read a text file and fill in a web form with the contents of that file? We need to get about 3000 records (5 fields to each record) into a database owned by...
8
by: Lyn | last post by:
Hi, Can anyone tell me how the initial value displayed in Combo Box is determined when a form is opened? I am loading the dropdown from one field ("CategoryName") of a table, with "ORDER BY ". ...
14
by: Thelma Lubkin | last post by:
I am trying to limit the user's options to the choices offered by the combobox text, but I don't want this to extend to how he spaces out the text, e.g. 'abcdefg' and 'ab cd efg' should be...
1
by: John Davis | last post by:
I am writing a program that allows user to select the date in a calendar, and it will update the text fields automatically. I created 2 forms. The first form has 2 text fields (start date and...
2
by: jonschatz | last post by:
I am creating an Web order system in dreamweaver. I have a page with a list of possible items for a customer listed in a repeating region with text boxes to enter quantity. Each field has a unique...
9
by: sellcraig | last post by:
Microsoft access 2 tables table "data main" contains a field called "code" table "ddw1" is created from a make table query of "data main" Goal- the data in "code" field in needs to...
1
by: sjvandevoorde | last post by:
I need some help with a couple forms/test fields. Bare with me I have been out of the field for some time and only consider myself an intermediate user. The first one is a subfrom which lists...
1
by: ChrisFrohlich | last post by:
ASP.NET 2.0 with Text DataTypes: I've got a similar question going in the SQL group, but I was wondering if anyone has successfully implemented reading/writing character data from a Text datatype...
5
by: vsteshenko | last post by:
Hello, This is my second post to the any usernet group and the first one was posted to the wrong one. I am currently working on creating an order form for sales associates at my work to be used...
1
by: hotrod57 | last post by:
I am trying to append the results from a form to a text file. My code is supposed to print out the results on one page, and append the results to another page each time data is entered on the form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.