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
(sfrmSales). Of course, I also created two new tables for the subforms
(tblPurchases) and (tblSales). And also created three queries
(qryPurSales) and (qryPurchases), (qrySales) - the latter two use the
Sum function to group by ID and sum by the columns. The relationships
are the main form table as one to the two subform tables as many.
Everything seems to work okay, except that I'm having difficulty
sorting out the DSum expressions to use to provide some of the column
totals. Additionally, I have summary section at the top on the main
form showing the grand total results of the subforms along with more
calculations.
The three column totals that I having difficulty with all probably
require a similar expression. It is the sfrmSales TotalSales, Discount
and NetSales columns that do not total. The totals across are okay,
but the grand total at the bottom of each is not. As a side note, one
of the expressions I have used for the Purchases to be summarized in
the main form section which works is:
=DSum("[Purchases]","tblPurchases", "[IDPur] = " & [IDMain])
I also tried using a Function module to open a SQL recordset, but
could not get it to work either. I have substituted many variations of
(IDSales), (tblSales), (qryPurSales) and (qrySales) in my expressions.
Any assistance will be greatly appreciated. Thanks. 1 4777
Say you have a subform named sfm1; its recordset includes a field named ABC
which you want to total and show on the main form.
Put a textbox on the footer of the subform (the textbox, or even the entire
footer can be set to visible=false).
Let's call it TotalABC; set its ControlSource like this:
=Sum(ABC)
Now put a textbox named MainABC on your main form; set its ControlSource
like this:
=sfm1.Form.TotalABC
HTH
- Turtle
"Dalan" <ot***@safe-mail.net> wrote in message
news:50**************************@posting.google.c om... 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 (sfrmSales). Of course, I also created two new tables for the subforms (tblPurchases) and (tblSales). And also created three queries (qryPurSales) and (qryPurchases), (qrySales) - the latter two use the Sum function to group by ID and sum by the columns. The relationships are the main form table as one to the two subform tables as many.
Everything seems to work okay, except that I'm having difficulty sorting out the DSum expressions to use to provide some of the column totals. Additionally, I have summary section at the top on the main form showing the grand total results of the subforms along with more calculations.
The three column totals that I having difficulty with all probably require a similar expression. It is the sfrmSales TotalSales, Discount and NetSales columns that do not total. The totals across are okay, but the grand total at the bottom of each is not. As a side note, one of the expressions I have used for the Purchases to be summarized in the main form section which works is: =DSum("[Purchases]","tblPurchases", "[IDPur] = " & [IDMain])
I also tried using a Function module to open a SQL recordset, but could not get it to work either. I have substituted many variations of (IDSales), (tblSales), (qryPurSales) and (qrySales) in my expressions.
Any assistance will be greatly appreciated. Thanks. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rolan |
last post by:
I'm using Access 97 and need some assistance in sorting out a proper
DSum expression. It relates to a subform (sfrmCost) from which I'm
wanting to extract the grand total of any and all data rows...
|
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....
|
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...
|
by: Dalan |
last post by:
Perhaps someone can share information on the methods to use to effect
the automation process of creating the property to set the
AllowBypassKey function. I was directed to:...
|
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...
|
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...
|
by: phaddock4 |
last post by:
Being fairly inexperienced at Access 2000, i've been reading many posts
here for the last several days, and testing myself to find the best
approach to do the following in A2K:
SET UP:
I have...
|
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...
|
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...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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,...
|
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...
|
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...
|
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,...
| | |