hello,
i'm having this problem when try to display the total amount form subform to form,for example i'm having two tables one for the products which contains(p_no,p _name,price),an d the other table contains(p_no,t otal_price,tota l_amount)
so the first table is placed in subform and the other table is placed in the main form,i wanna to calculate the total (price) in subform and display the result in the (total_price) field in main form,i'm tryin to use the dsum function but it dosent't work and give me this error (#name), can any one help????????
1 1335
hello,
i'm having this problem when try to display the total amount form subform to form,for example i'm having two tables one for the products which contains(p_no,p _name,price),an d the other table contains(p_no,t otal_price,tota l_amount)
so the first table is placed in subform and the other table is placed in the main form,i wanna to calculate the total (price) in subform and display the result in the (total_price) field in main form,i'm tryin to use the dsum function but it dosent't work and give me this error (#name), can any one help????????
zaiena,
the way it usually works is:
1. you have a total for the subform details in the <<footer>>> section of the subform, which should have this expression: = Sum([Price])
2. the main form total gets a copy of the subform total by means of the following expression in the main form textbox for the total:
Me!total_price. Value = Me!YourSubformC ontrol.Form!You rSubformTotalNa me
3. To refresh the main form total any time the subform total changes, place the following code behind the subform (not main form): -
Private Sub YourSubformTotal_Change()
-
Me.Parent!total_price.Recalc
-
End Sub
-
You need to replace any generic names I used above with the actual names of those objects in yor application. Let me know how it goes.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Rolan |
last post by:
I'm using Access 97 and need some assistance in sorting out a proper
DSum expression, or maybe even DCount might be an alternative. I have
tried numerous combinations, but with no apparent success.
The DSum function relates to a subform (sfrmCost) with a text box
(RefCost) which is intended to be the container for a total from a
query (qryItems). The query has three number columns from the table
(tblItems) of which I have an expression...
|
by: Dalan |
last post by:
I have tried both methods of using DSum and creating a Function to
address summing some number columns, but to no avail. Since this has
been a popular topic over the years, I'm sure I'll receive some
guidance. This is related to Access 97 and involves my redoing a
miscellaneous purchase and sales form.
A main form (frmMain) is used that contains summary information of the
item. I incorporated two continuous subforms (sfrmPurchases) and...
|
by: Dalan |
last post by:
I seemed to be having problems with structuring the use of NZ with a
DSum expression. Having tried numerous variations of the expression
without success, I'm asking for assistance.
First some background (Access 97) - the DSum expressions are being
used in grand total text boxes on the footer of a subform. And when
viewing the subform in the linked main form the two grand total boxes
display #Error if no entry had been made. Those with...
|
by: John Baker |
last post by:
Hi:
I have a form, and wish to show on the form the current total for a single field on a
table. I have set this up thus: =DSum(,!) in an unbound
text field. These are correct field and table names. While the formulation is accepted by
the system, nothing appears in the field and no results show up at all. I tried a number
of combinations with no success. Can someone tell me what I am doing wrong?
Thanks
|
by: Mark Reed |
last post by:
All,
I have never used this function before and am not sure it what I need.
Just to clarify, I have a report based on a query which has amoungst other
field, wk, parea & packs_req. What I am trying to do is create a subreport
for the main report which gives a generalised breakdown of the main report.
For the gender of 'Ladies', there may be several parea's so I want to sum
the packs_req for ladies only. (Gender is not a field I can use,...
| |
by: beppe005 |
last post by:
I would like to calculate a total for all the field with the same
in a query.
I don't know how to set the "criteria" for this dsum function, it should be
something like = but it doesn't make sense.
The query is something like:
+-- --- ---- ---- --- ---+
+--1-----Alpha-------a1----------------1------------4------------------+
+--1-----Alpha-------a2----------------3------------4------------------+
|
by: Marc Aube |
last post by:
Is there a web site that can ofer some help. The quotation marks are posing
an issue as well as other items for this function. I have some books but
they are not consistent in their use of the code lingo. Thank you for any
help. Presently I have tables and forms to gather employee info. I use the
subform to gather status of absence, text field. What I want to do is
calculate the vacation hours and subtract them from the total alocation of...
|
by: patjones |
last post by:
Good morning all:
In what seems like an ongoing saga to make the DSum function do what I need it to, I am now having trouble with a user-defined function in my VBA module. Here's the offending line of code:
Me!txtLostDaysNoPaySeasonal = DSum("getNumberOfWeekdays(!, !)", "qryTest", "! = 'BK21312'")
In this, getNumberOfWeekdays is a function that I define elsewhere in the module, as such:
Function getNumberOfWeekdays(dteStartDate...
|
by: jmoudy77 |
last post by:
Hi,
I'm trying to use a variable "FirstSemi" as the second criteria in a DSum function. The DSum function is used in the same Form_Load function that the variable was declared. I keep getting an error referencing the variable in the DSum function when the form loads. Any ideas?
And > FirstSemi")
-Josh
|
by: Adam1331 |
last post by:
I've been trying to get the DSum function to work but I've been running into some roadblocks. What I'm trying to do is to total up times in a timesheet report into different departments. The report is based on a query that gathers all an employee's info. In that query, I have a calculated field which gives an employee's total time on a process.
(DateDiff("n",,))/60
This gives the total time in hourly fractions. Now what I'm trying to do...
|
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: 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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |