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

how to pass value of textbox from subform to main form in vb

i want to pass the value of text box from a subform "concession" to a main form "student_detail" i am using the format
forms!mainform name!subform name!ftextboxname.value
to assign the textbox value to a variable
and when i want to display the result in an other textbox on same subform i use the format
forms!subformname!textbox name.value=variable name
but it is not working
Jul 7 '13 #1
1 21441
zmbd
5,501 Expert Mod 4TB
That is because you are not referencing the subform and contrls correctly. Please take a look here:
ACC: How to Refer to a Control on a Subform or Subreport
To refer to a control on a subform, use the following syntax:

Expand|Select|Wrap|Line Numbers
  1.    Forms![main form name]![subform control name].Form![control name]
To refer to a control on a subreport, use the following syntax:

Expand|Select|Wrap|Line Numbers
  1. Reports![main report name]![subreport control name].Report![control
  2.    name]
It is important to note that you cannot refer to controls on a subform with the following syntax:

Expand|Select|Wrap|Line Numbers
  1. Forms![subform name]![control name]
Jul 7 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: chris vettese | last post by:
Is there a way I can grab a value from my main form and use it in a calculation on a subform?
9
by: chris vettese | last post by:
On my subform I have a field in the footer that totals the value of a field. On the main form I have referenced this field. I'm using this field in a calculation on my main form. The problem...
3
by: jquest | last post by:
I have a database about services and installations as well as warranty and services for a company I run. The main form is the customer info form. On this I record names, address and phone numbers....
3
by: JoelH | last post by:
This is really weird... I'm using Visual Basic 2005 Express I have a form - Form1 - with a control called txtStatusBox I have a module attached to the solution for storing some other code. This...
4
by: Scotter | last post by:
Hello. I'm having problems understanding how to calculate a total on my main form based on the items in my subform. I've tried runing update querys and thats not working, and Ive tried just...
2
by: ToddM326 | last post by:
I have a form (frmReport) with a list box (lstFileName) and a sub form that are not directly related, but I want to be able to store the value from the list box in one of the fields of the sub...
12
by: etmanage | last post by:
I have a subform that totals a subtotal in the form footer. It works fine. I then pull that value onto the main form into a textbox called Subtotal2 by setting the control source...
27
by: tragaz | last post by:
Hi There, I'm a beginer in Access and VB. In my Database, I've got a form with a subform. the subform is a query from a table different than the table of the main form. those tables don't have a...
24
by: MNNovice | last post by:
I am trying to display a value from the sub form on to the main form. It's not a calculated data, just plain text. This is what I attempted without success. 1. Created a text box called...
0
by: Anton Melamed | last post by:
Hi, I would very much appreciate any help give. Im creating database for handling stock of shoes with different sizes and orders. I have main form - Stock with a subform - Orders Each forms...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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
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.