473,395 Members | 1,583 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,395 software developers and data experts.

Referencing fields between forms

Hi

How can I read the value of a field on a form A from a form B? Both forms A
& B are open.

Thanks

Regards
Nov 21 '05 #1
1 1150


August 8, 2004

Where if form B opened and declared? You would have to use
use the instance of form A to get the underlying text. For example:

label1.text = FormAInstance.textbox1.text

or reverse

label1.text = FormBInstance.textbox1.text

If FormA is the startup form, then you will have to obtain the
instance logically. If you have multiple forms, you should place
both instances in a module:

public module something
public frmA as formA
public frmB as new formB
end module

Then to set frmA to a living instance, place this code in FormA's
Load event:

frmA = Me

This will set frmA to the living instance of FormA. Then you can
use frmA.textbox1.text to obtain the value you need!
I hope this solves your problem!
Joseph MCP
"John" wrote:
Hi

How can I read the value of a field on a form A from a form B? Both forms A
& B are open.

Thanks

Regards

Nov 21 '05 #2

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

Similar topics

8
by: J. Black | last post by:
Hello everyone - I've been developing an incident tracking and reporting system for an emergency services outfit that I work with part time. It's going well, except for one fly in the ointment....
0
by: Robert Jarrett | last post by:
Trying to resolve what seems a complicated issue (to me); will simplify description of issue w/ an analogy: A -- 5 tables - Memories, engrams, P (persons), L (locations), and T (things). All start...
1
by: jesse.hartwick | last post by:
Hey.. I was just wondering why there are so many ways to reference a form and what are the pros and cons of using each. I've seen at least 5 different ways, which is correct (or in what...
4
by: mplogue | last post by:
I have a form (frmMain) with a subform (frmSub), each with enumerated fields of the same name (txt1, txt2, etc). I'm trying to make a function that will take the values for each field in frmMain,...
2
by: Axel | last post by:
Hi, a question about something that seems very simple at first glance: is it possible to reference other controls of a subform in a query window without referencing through the parent form? I...
9
by: freeskier | last post by:
I am working on a form to edit student field placements. the student is selected from a combo box (cboStudent) which then populates a list box(lstPlacements) with field placements for that student....
3
HopeHal
by: HopeHal | last post by:
I have a form which references two tables. The second table has a one-to-many relationship with the first table. I have a button which is intended to copy the key value from the second table to...
2
by: Andrus | last post by:
I need compile in-memory assembly which references to other in-memory assembly. Compiling second assembly fails with error Line: 0 - Metadata file 'eed7li9m, Version=0.0.0.0, Culture=neutral,...
1
by: Tom | last post by:
My unsigned DLL works in my project that references it as long as I set Copy Local = true. Now I have signed the DLL with the sn.exe generated keys but have not yet moved the DLL into the GAC. ...
6
by: viperRider | last post by:
Another question to people smarter than me! LOL I have a form with a variable - Dim cboOriginator as TextBox - that holds the info about a textbox i click on. when i click on it, i have a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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.