Results 1 to 6 of 6
  1. #1
    latifju is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    6

    How can I calculate runing sum in access report?

    I have data as given below:
    ID InstDate InstTaka AC_Num
    1 01-jan-13 3500 38000011
    2 01-jan-13 3500 38000028
    3 01-jan-13 3500 38000035
    4 01-feb-13 3500 38000011
    5 01-feb-13 3500 38000028
    6 01-mar-13 3500 38000011
    7 01-mar-13 3500 38000035













    Now I want it [AC_Num]=38000011
    InstDate InstTaka CumTotal
    01-jan-13 3500 3500
    01-feb-13 3500 7000
    01-mar-13 3500 10500

    I am not good in access but I need it so hardly. If you help me to findout the solution I will be bery greatfull to you.

    [N.B.
    Code:
    SELECT Orders.EmployeeID, Sum(Orders.Freight) AS SumOfFreight, DSum("Freight","Orders","[EmployeeID]<=" & [EmployeeID] & "") AS RunTotFROM Orders
    GROUP BY Orders.EmployeeID;
    I have used this but not work for me.]

    Please see the attachment: DSum.zip

    Thanks in advance
    Last edited by latifju; 04-20-2013 at 02:08 AM. Reason: rearrange

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    The [EmployeeId] field is a date/time field(??). Date/time fields should be always surrounded by "#" sign for calculations.
    Try :
    SELECT Orders.EmployeeID, Sum(Orders.Freight) AS SumOfFreight, DSum("Freight","Orders","[EmployeeID]<= # " & Format([EmployeeID],"mm\/dd\/yyyy") & "#") AS RunTot
    FROM Orders
    GROUP BY Orders.EmployeeID;

  3. #3
    latifju is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2013
    Posts
    6
    Thnaks amrut. Its working but I only want calculation for [AC_Num]=38000011. See the second table.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,738

  5. #5
    latifju is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2013
    Posts
    6
    Thanks man I get it.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,738

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Runing a report from combobox
    By frksdf in forum Programming
    Replies: 2
    Last Post: 09-13-2011, 09:01 PM
  2. Runing a quey in the back end?
    By jbr87 in forum Access
    Replies: 7
    Last Post: 07-25-2011, 08:30 AM
  3. Runing Moduels from Macro's - Access 2003
    By damo1995 in forum Access
    Replies: 7
    Last Post: 02-10-2011, 03:40 AM
  4. Calculate avg in a report
    By bob006 in forum Reports
    Replies: 1
    Last Post: 11-18-2009, 06:31 PM
  5. Use report to Calculate sum and percentage
    By bangemd in forum Reports
    Replies: 3
    Last Post: 05-28-2009, 12:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums