Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 12th, 2004, 10:04 AM
Authorized User
Join Date: Jun 2003
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default sum function problem

I am doing a report in which the query that is being used utilizes two tables. In the report it totals up three columns. One of the columns it sums up fine but the other two does not. Here is the design view of the report:

         amount =sum(total) =amount-txttotal

Total: =Sum(amount) =sum(total) =Sum(amount-txttotal)
       Incorrect Correct Incorrect

I know for a fact the reason why both of these formulas do not work is because of the middle formula. One table entitled AllTasks table shows all the tasks being paid. For example, Task 1 is 15,000 Task 2 is 5,000 etc. What is happening is the amount field is duplicating itself by the amount of tasks from the total field. Both the Amount field and Total field are from seperate tables. Is there a way to correct this please?? Thanks :D

Old February 13th, 2004, 03:06 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts

Does the query on which the report is based show the correct results?

Clive Astley

Similar Threads
Thread Thread Starter Forum Replies Last Post
sum function pcase XSLT 2 January 2nd, 2008 05:51 PM
sum() function felixm_jr Reporting Services 1 April 22nd, 2007 01:59 AM
Sum function accuracy problem nuthib Crystal Reports 1 June 21st, 2004 02:12 AM
SUM Function jmss66 Classic ASP Basics 17 July 29th, 2003 08:00 AM
Need Help with the Sum Function athanatos XSLT 1 July 22nd, 2003 10:06 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.