Results 1 to 7 of 7
  1. #1
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sorting on 2 Fields (xp)

    The attachment shows the QBE view of a query I am using. However, when run, the query displays only one field sorted in ascending order. How do I get what I want?

    Secondly, I am creating a report based on a sorted query. At the moment, the report displays a continuous list. Is it possible to force the report to start on a new page when the tutor group (the sorted field) changes?

    TIA
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  2. #2
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting on 2 Fields (xp)

    Rob, I'm assuming you want to sort by tutor group first...did you select that one first? I'm not very familiar with sorting like that, but for me if I choose one field to sort by first, then another (2nd), access remembers which I picked first and sorts by it first, etc...

    As far as your report, have you tried to group by tutor group, and in your detail section, force a new group after section?
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  3. #3
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting on 2 Fields (xp)

    Thanks for the reply, Jeremy. No matter in which order I choose to sort, the query returns records only sorted by Tutor Group. As for your second suggestion, I shall give that a go tomorrow.
    Thanks
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  4. #4
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting on 2 Fields (xp)

    Rob, try including tutor group in your query twice, uncheck the box 'Show'. Place it in front of your SurName field, so it is the first field, and try Sort Ascending there.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  5. #5
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting on 2 Fields (xp)

    That's sort of sorted out the sorting! <img src=/S/grin.gif border=0 alt=grin width=15 height=15> Thanks Jeremy.
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  6. #6
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting on 2 Fields (xp)

    <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15> Anytime...
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  7. #7
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Sorting on 2 Fields (xp)

    Actually the sort order in the query is irrelevant in this case.

    Reports based on queries do not adopt the sort order of the query. You have to specify the sorting of the report within the report using the sorting and grouping dialog.

    Group on tutor group, and include a group footer for that group. Then set the NewPage property of that footer to "after section'. If you don't want to put anything in it,its height can be very small.
    Regards
    John



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •