Hi,
I am using MS Access 2007/Vista
I have a field, ProductCost in the subform. i need to find the total of ProductCost and assign it to a field, Total, in the Main Form .
I read an article about how to find Sum from a subform field.
based on that, i stored the total value in an unbound field.
i dont know how to assign the value from the unbound field to a bound field , Total, in the main form.
can anyone help me in this regard,?
thanks
Kathy
3 14296
Hi,
I am using MS Access 2007/Vista
I have a field, ProductCost in the subform. i need to find the total of ProductCost and assign it to a field, Total, in the Main Form .
I read an article about how to find Sum from a subform field.
based on that, i stored the total value in an unbound field.
i dont know how to assign the value from the unbound field to a bound field , Total, in the main form.
Hi there!
In subform's footer put an unbount control named SumProductCost. It's source property should be: =Sum(ProductCos t)
...If I understood correctly you allready came this far.
To show this total on the Main form put an unbound control named MainTotal in Main form's detail or footer section (if it's gonna be visible).
In MainTotal's source property put: =Me!SubFormName .Form.SumProduc tCost
I'll be here if you have more questions. Also you might try to read help in MSAccess, it's full of advices like this :-)
h.
thanks for your reply.
I can get the value in the main form unbound field.
but i dunno how to store that value in to a bound field in a table...
for example,
i used the suggestion you gave me and i created an unbound field MainTotal
it works like a charm.
now, i wanted to assign the value in MainTotal unbound field into a field, TOTAL, in the main table.
is it possible to acheive this???
thanks in advance.
luv,
Kathy
hey Kathy
Usually calculated values are not supposed to be stored in the tables because they can be allways recalculated. Anyway, if you wanna store that walue in the TOTAL field on your Main Form just add a code like this in your Sub Form's after update event: - Me.Recalc
-
Me.Parent.TOTAL = Me.Parent.MainTotal
After this Main Form will be in editing mode, and changes will not yet be saved so you can discard changes if you want.
Best,
h.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: William Wisnieski |
last post by:
Hello Again,
I'm really stuck on this one.....so I'm going to try a different approach to
this problem.
I have a query by form that returns a record set in a datasheet. The user
double clicks on a row and a main form (pop up) opens bound to a table with
a continuous subform bound to another table.
On the main form is a field called . It is vital that this is
|
by: Pat |
last post by:
Hello,
I've used Sum() to total bound fields on a continuous form with no problem.
However, I now have a continuous form, on which I use an unbound field to
calculate the number of hours between two times stored in a record (bound
fields). This field is called txtDuration.
On my footer, I've created another unbound field named txtWeeklyTotal. I've
set the Control Source to =Sum(), but this returns a #Name?
error. I've tried . and it...
|
by: Megan |
last post by:
Hi everybody-
I have 2 tables, Hearings and Rulings. Both have primary keys called,
CaseID, that are autonumbers. I don't want both tables to have the
same autonumber. For example, if Hearings has 55, then I want Rulings
to have a number greater than 55. Two or more Hearings may be entered
before a Ruling is entered. For example, Hearings with CaseIDs= 55,
56, and 57 may be entered before a Ruling or vice versa. There is no
definite...
|
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 ". The values in the dropdown are loaded in the
correct order, but the initial value is not the first row of the dropdown as
I expected.
The field "CategoryName" is not the primary key for the table -- the PK is
|
by: simon |
last post by:
I have an unbound RTF2 control in an Access 2003 form which I set to
show either unformatted text or else text with words and sentences
highlighted. I do this by setting the PlainText property, getting back
the rtfText and then adding the highlighting strings and resetting
rtfText as below:
sqry = "Select * from TextContent where FileID = " & ID
Set rs = CurrentDb().OpenRecordset(sqry, dbOpenSnapshot)
With rtfUnformatted
..rtfText = ""
| |
by: Matthew Wells |
last post by:
Hello.
I've converted a bound Access 2000 form which displays data retrieved from
an Access 2000 database to an unbound form. Now my hyperlinks don't work.
I'm assuming it's because the form isn't bound anymore. I didn't even have
that field's data type as hpyerlink - just test. I did have the form
control's "hyperlink" property set to true and it worked fine in bound mode.
The fields stores paths to pdf files. How can I make the...
|
by: sfindlay |
last post by:
I have two comboboxes in an unbound field:
- finds Vendor ID, and from this list
finds Application ID using Vendor ID as the filter.
The application details are populated in a subform bound to a query "Find Application" based on a single table and the two tables are linked by Application ID.
The form is designed to enter or edit application details ie if I can't find the Application in the second combobox I add it into the subform.
...
|
by: colleen1980 |
last post by:
Hi: There are two textboxs in my main form. One is bound and another is
unbound. There is no entry in the unbound textbox as values come into
automatically after entering some information in the subform. My
question is how to i pass values from unbound textbox to bound textbox
every time when the value change in unbound textbox i need to change
the value in the bound textbox. When the form load there is already
value in the bound textbox...
|
by: SBC News Groups |
last post by:
Using VBA how do I assign columns from a table to controls on an unbound
form?
Mike
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |