Results 1 to 5 of 5
  1. #1
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013

    using dsum in query for each record (not running total)

    I would like to use a dsum that I use on my form but in my form I reference the Current record ID. Can you do something like this in the query. In the query there is not active id showing, so I am not sure how to do this.

    basically I want to query a list of cars and for each car show a total for the repairs done. I do this in the form by referencing the car id, but I can't do that in the query

    I am not looking to get a running total, just the total repairs for each car.

    Thanks for any help.

  2. #2
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    I know what I can do it using a sub query and that works. I was just wondering if there was any way to do it with a dsum.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    you don't DSUM in a query, you just SUM.
    (turn on the summation button.)

  4. #4
    Welshgasman is online now Expert
    Windows 10 Access 2007
    Join Date
    Jan 2017
    Swansea,South Wales,UK
    Group by CarID and sum the relevant field ?
    Please, please use # when posting code snippets.
    Cross Posting Etiquette:
    Debugging Access:

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    The Great Land
    So you need to sum data in another table? You have it working with a subquery? Why is subquery needed and not just joining tables and use aggregation?

    Yes, DSum can do it but can cause slow performance in query and form.

    Or build a report and use its Sorting & Grouping with aggregate calcs. This allows display of detail data as well as summary info
    How to attach file: 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. Replies: 1
    Last Post: 02-04-2020, 01:29 PM
  2. DSUM Running total by group
    By chowing0823 in forum Access
    Replies: 8
    Last Post: 03-02-2015, 09:12 AM
  3. Replies: 6
    Last Post: 11-05-2014, 03:00 PM
  4. Replies: 34
    Last Post: 03-03-2014, 09:24 AM
  5. Replies: 2
    Last Post: 12-05-2012, 02:41 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 - Senior Forums