Results 1 to 4 of 4
  1. #1
    Medivh is offline Novice
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    2

    Sum() everything till date

    Hi. I have created many-to-many relationship as below:

    I'd like to create query/ies which will give me table with following columns in result:
    Tasks.[Task name] | Tasks.[Money planned] | Resolutions.Number | Resolutions.[Resolutions date] | Changes.[Amount change] | [Money in result]

    The problem is the last column which suppose to be:
    [Money in result] = Tasks.[Money planned] - "Sum of Changes.[Amount change]" till Resolution.[Resolutions date]"

    For example:


    I think that one query is not enough, but still can't figure out what that second query should be. Or am I wrong?

    Thanks in advance for your help.

  2. #2
    jzwp11 is offline VIP
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    It sounds like you need a running sum by task number. This is best accomplished with a nested query. I've did a mock-up of your database (I changed the field names slightly by getting rid of the spaces in your fieldnames. Spaces and special characters are not recommended in table and field names). The example database is attached.

  3. #3
    Medivh is offline Novice
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    2
    That's exactly what I was trying to achieve. Thank you very much.

  4. #4
    jzwp11 is offline VIP
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You're welcome. I'm glad it worked out for you.

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

Similar Threads

  1. Replies: 1
    Last Post: 07-07-2010, 04:22 PM
  2. set date field on form to date variable
    By laavista in forum Access
    Replies: 3
    Last Post: 06-28-2010, 03:03 AM
  3. hide text box till you un-tick check box
    By islandboy in forum Access
    Replies: 14
    Last Post: 09-06-2009, 10:08 AM
  4. Replies: 2
    Last Post: 07-31-2009, 06:56 AM
  5. Replies: 1
    Last Post: 12-09-2005, 10:29 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