Results 1 to 4 of 4
  1. #1
    alamnizamani is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    2

    Post Aggregate function in ms access does not work in my budget program

    I am trying to prepare a mini budget program in ms access for my personal use in my office , but every time i fail to do so, is there any one who can help me in this regard my tables are as under
    Field Name Properties
    Code ID AutoNumber


    001 Cash
    002 Bank
    846 conveyence
    dt: Date/time
    Code text (list selected by drop-down list)
    des Description
    Bill currency
    yearly Budget currency
    quartlyBudget currency



    Query Question:

    Group Aggregate function in my Budget data base file

    (A) (B) (C) (D) (E)
    Code yearlyBudget quaterlyBudget quaterlyused Budget Available Budget
    846 50000 12500 5000 7500
    850 100000 25000 20000 5000

    There are 100 entries in code no. 846 and 50 entries in code no.850 the above given amount is total of each code no.
    my question is that how can i get result subtracting amount in column (D) from column (C) to get result in column (C)

    Budget Available: in Code 846 i.e column (E)

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Can have an expression in that query:

    Sum([C]) - Sum([D])

    Consider building a report using grouping & sorting with aggregate calcs. This will allow display of detail records as well as summary calcs.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    alamnizamani is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    2
    Sir, I have done as you advise me but i receive the following error message i.e
    Can not have aggregate function in expression (sum(sum([Credit])-([Debit])))
    I typed this in my last column Expr1: Sum([Credit])-Sum([Debit])

    Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Did you change the Total row under that calculated field to Expression?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. more aggregate function questions
    By boutwater in forum Access
    Replies: 6
    Last Post: 09-29-2011, 02:53 PM
  2. aggregate error due to function
    By boutwater in forum Access
    Replies: 2
    Last Post: 09-26-2011, 03:39 PM
  3. Replies: 1
    Last Post: 05-10-2011, 08:31 PM
  4. Invoice Program Will Not Work in Windows 7
    By wallyb in forum Access
    Replies: 1
    Last Post: 08-02-2010, 02:00 AM
  5. Access SQL Query - Aggregate function
    By jack in forum Access
    Replies: 0
    Last Post: 11-10-2009, 08:06 PM

Tags for this Thread

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