Results 1 to 4 of 4
  1. #1
    bmarkj is offline Novice
    Windows 8 Access 2013
    Join Date
    Jul 2014
    Posts
    2

    Question How do I do a subtotal on a sort field?


    I have created a report pulled from a query showing directors, films, release year and main character. I have grouped on the director and sorted on the film title, but I can't figure out how to return a subtotal of the number of films done by each director. Any thoughts??? I'm using Access 2013 in a Windows 8.1 environment. Thanks for any help anyone can provide!

    -bmarkj

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Perhaps you can use an unbound textbox control in the footer or header of one of your groups. You can place expressions in unbound text box controls. Perhaps an expression using the Sum() function will suffice.

    =Sum(FieldName)

  3. #3
    bmarkj is offline Novice
    Windows 8 Access 2013
    Join Date
    Jul 2014
    Posts
    2
    OK, I tried that. Sum wouldn't work, but Count did. However, it returns the total number of ALL films for each sort group, i.e., each sort group has the same number in it, and that number is the total of all films in the report. Hmmmm.....

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    You are correct to use the Count() method. I misspoke earlier.

    So the footer for any given group is only good for that group. You discovered this. So the options are to create more groups or use code to get the info you need.

    Outside of the report you could create additional queries to do calculations and then nest said query as a subquery.

    Outside of the report you could possibly create another report and then nest said report as a subreport.

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

Similar Threads

  1. Unable to sort field
    By Lookup in forum Access
    Replies: 5
    Last Post: 08-18-2013, 01:20 PM
  2. Does anyone know how to sort the field list?
    By tstoneami in forum Access
    Replies: 4
    Last Post: 08-08-2013, 12:32 PM
  3. Group by one field, sort by another
    By tylerg11 in forum Reports
    Replies: 4
    Last Post: 03-05-2013, 01:17 PM
  4. Button to Sort by Field
    By tylerg11 in forum Programming
    Replies: 4
    Last Post: 10-20-2011, 02:43 PM
  5. Sort according to field length?
    By wawinc in forum Queries
    Replies: 4
    Last Post: 12-15-2010, 04:27 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