Results 1 to 4 of 4
  1. #1
    rawandjamal is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2010
    Posts
    5

    sum data in a query

    hi,
    I have an access database query this query contain tow colume like this:

    Input Output Balance
    500$ 100$ ([Input]-[Output])=400$


    good but i need when i entire a new record in the table the balance sum the current record with the previous record like this :

    Input Output Balance
    500$ 100$ ([Input]-[Output])=400$
    400$ 200$ Current Record=200 I need to be a 600(200+400)
    How i Do this help please?

  2. #2
    jzwp11 is offline VIP
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    If I understand you correctly, you should be able to use another query that uses the first query as its record source to do the summing.

    I believe Access 2007 has the ability to select records and total them within the same query, but I have not used that feature. You might what to check the help section. In older versions of Access, you had to create a separate query to do the sum as I suggested.

  3. #3
    rawandjamal is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2010
    Posts
    5
    When I create another query and try to sum the record its gave me the same result only it summing the balance record with together not with a previous record I think this can happen with vba code but i dont how

  4. #4
    jzwp11 is offline VIP
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Can you please provide the SQL text of the 2 queries you created as well as details on your table structure?

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

Similar Threads

  1. No Data in Query
    By Huddle in forum Queries
    Replies: 3
    Last Post: 08-09-2010, 08:32 AM
  2. UnMatched Data Query (Edit Data)
    By pedraza4 in forum Queries
    Replies: 3
    Last Post: 06-16-2010, 07:29 AM
  3. Query doesn't return all data
    By hawzmolly in forum Queries
    Replies: 6
    Last Post: 03-26-2010, 09:12 AM
  4. Excluding data in a query
    By lpdds in forum Queries
    Replies: 1
    Last Post: 12-16-2009, 08:06 PM
  5. data query question
    By mrayray09 in forum Queries
    Replies: 0
    Last Post: 01-20-2009, 08:41 AM

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