A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Total is not calculating correctly?



 
 
Thread Tools Display Modes
  #1  
Old June 28th, 2005, 08:05 PM
ZIMMJE
external usenet poster
 
Posts: n/a
Default Total is not calculating correctly?

Here is the setup:

In ClassID header I have: ClassDate, ClassName, CompetencieID, Credithours
In the detail I have:Competency name(each class could have multiple
competencies)

For my report total: If a class had 2 credit hours but 3 competencies in
the detail the Total Credit hours is reporting 6 instead of 2. The way I
have the calculation in the report total is =sum([credithours])

Any advice would help

JZ
  #2  
Old June 29th, 2005, 03:25 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

Yes, if you look at the query that feeds the report, you will see that
Access repeats the 2 credit hours for all 3 records (with the different
competencies), and so when you add up the total you get 6.

To avoid that, use a Running Sum in the group header to sum the hours for
the header, but not repeat them in the detail section. You can then show the
total hours in the report footer like this:

1. Add a text box to the ClassID group header, and set these properties:
Name: txtSumOfHours
Control Source: =[CreditHours]
Running Sum: Over All
Visible No
(Add this, even if you already hae a ClassHours text box.)

2. In the Report Footer section, add a text box with Control Source of:
=[txtSumOfHours]

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"ZIMMJE" wrote in message
...
Here is the setup:

In ClassID header I have: ClassDate, ClassName, CompetencieID, Credithours
In the detail I have:Competency name(each class could have multiple
competencies)

For my report total: If a class had 2 credit hours but 3 competencies in
the detail the Total Credit hours is reporting 6 instead of 2. The way I
have the calculation in the report total is =sum([credithours])

Any advice would help

JZ



  #3  
Old October 20th, 2008, 08:23 AM posted to microsoft.public.access.forms
Sami
external usenet poster
 
Posts: 22
Default Total is not calculating correctly?

Dear Allen,

I have a similar issue.

record layout

Table: IPAWS - contains shipments, pcs, kgs

Table: Marks - contains markings

Relationship- Shipment to Markings one to many

i.e one shipment has multiple markings

Problem:
When I create a query and display it in DATASHEET View I see all the data is
repeated for every marking furthermore when I generate report and do a total
it adds pcs as many times as markings. i.e when one shipment weights 5 kg
and has 5 markings it shows the total as 25 kgs. Please help I have tried to
implement your earlier proposed solution to ZIMMJE but has not resolved my
problem. Any help will be appreciated.

Thanks

Sami


"Allen Browne" wrote:

Yes, if you look at the query that feeds the report, you will see that
Access repeats the 2 credit hours for all 3 records (with the different
competencies), and so when you add up the total you get 6.

To avoid that, use a Running Sum in the group header to sum the hours for
the header, but not repeat them in the detail section. You can then show the
total hours in the report footer like this:

1. Add a text box to the ClassID group header, and set these properties:
Name: txtSumOfHours
Control Source: =[CreditHours]
Running Sum: Over All
Visible No
(Add this, even if you already hae a ClassHours text box.)

2. In the Report Footer section, add a text box with Control Source of:
=[txtSumOfHours]

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"ZIMMJE" wrote in message
...
Here is the setup:

In ClassID header I have: ClassDate, ClassName, CompetencieID, Credithours
In the detail I have:Competency name(each class could have multiple
competencies)

For my report total: If a class had 2 credit hours but 3 competencies in
the detail the Total Credit hours is reporting 6 instead of 2. The way I
have the calculation in the report total is =sum([credithours])

Any advice would help

JZ




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Max Total of "Max" in reports buddhapenguin General Discussion 1 June 1st, 2005 12:11 AM
Calculating total from column of subform controls Mike Using Forms 3 May 6th, 2005 07:54 AM
Grand Total Problem PW11111 Running & Setting Up Queries 2 March 11th, 2005 05:44 PM
Running Total Kristen Using Forms 3 June 28th, 2004 09:21 PM
formula not calculating correctly Worksheet Functions 3 March 9th, 2004 12:18 PM


All times are GMT +1. The time now is 01:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.