Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Apr 2008
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sorting data on report (2002)

    I have created a report that shows hours people worked on different dates. I then created a textbox to total the hours for each person.

    I know how to sort the results by the last names using the sorting and groups box.

    How can I sort by total hours worked (totalhours) when that field is not in the query that the report is based on so that the person with the highest number of hours appears first in the list.

    Thanks.

    Paul

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sorting data on report (2002)

    By creating a query that calculates the hours worked per person, and using that query as record source for the report.

  3. #3
    2 Star Lounger
    Join Date
    Apr 2008
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting data on report (2002)

    Ok I created the totals query and I can now sort the list of names by the total hours.

    I now need to get the additional info that I need for the report from a query called qrystudentinfo. One field will be organization.

    Is this where a use the dLookUp command in the other textboxes to get the info.

    Can you give me an example of one of those.

    Thanks.

    Paul

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sorting data on report (2002)

    Can't you create a query that links the other queries on the appropriate field(s)?
    The query for a report doesn't need to be updateable, so it's ok to include a totals query in the record source.

  5. #5
    2 Star Lounger
    Join Date
    Apr 2008
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting data on report (2002)

    You are correct.

    That will work. I had not thought of that approach.

    Thanks.

    Paul

Posting Permissions

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