Results 1 to 2 of 2
  1. #1
    tylerg11 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    200

    Sorting a group by a field other than the grouping field

    I have a tricky scenario here that I am trying to handle with a report, but I'm really hitting a wall. I will try to explain what's going on as simply as I can.



    The recordset of the report contains a list of orders, each with a company name, $ amount, and order date. The goal is to create a report that groups by company (showing only the company name once), with the total $ value, and the max of the order date. This is all simple enough, and best done on the query side, because Access does not handle the "grouping on one field, sorting on another at the same level" functionality. So at first I did this in the query, and on the report I just added a sort to the $ field.

    Further, I need to be able to allow the user to specify a date range for the "ungrouped" recordset that contains each order date. I can't do this if I am grouping to get a max date on the query side. So now I had to change that recordset to not group by date. Now I would be forced to do this on the report side. I am basically trying to grouping on the Company field, while sorting by the $ amount. Really running into a wall. Don't know if this is possible. Any help would be greatly appreciated.

    Thanks.

  2. #2
    Parsonshere is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2012
    Location
    Rusk
    Posts
    25
    I use a action query or series of queries to create a temporary table recordsource that is built when the report is run, using docmd.runsql in a module. Other than that, can u maybe leave the detail section out of the report, and just use the group headers or footers. I don't think you can accomplish the goal that way, but might think that through.

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

Similar Threads

  1. Sorting\Grouping question from a newb
    By jcampbell in forum Reports
    Replies: 1
    Last Post: 02-25-2013, 03:28 PM
  2. Grouping by a specific field.
    By Boss_Tally in forum Queries
    Replies: 1
    Last Post: 01-13-2013, 01:25 PM
  3. Sorting and Grouping in a report
    By Lisa Perry in forum Reports
    Replies: 3
    Last Post: 06-06-2012, 10:43 AM
  4. Replies: 11
    Last Post: 01-12-2012, 07:55 PM
  5. Sorting and Grouping
    By mduplantis in forum Queries
    Replies: 3
    Last Post: 07-29-2010, 12:31 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