Results 1 to 3 of 3
  1. #1
    munroe47 is offline Novice
    Windows XP Access 2002 (version 10.0)
    Join Date
    Mar 2012
    Location
    Oregon
    Posts
    12

    Report sorting problems

    I am using a simple database (Access 2010, Windows 7) to keep records of inspections I do on construction projects. I have one table (Projects) that contains project criteria (Project Name, Contractor, etc.) "Project name" is the primary key in that table; it is a unique value.

    I have a second table (Site Visits) that contains criteria concerning each inspection visit to a project. It has five fields: Date, Weather, Inspector name, Project name, Entry. "Entry" is a memo field that contains any observations for that particular visit. "Project name" is a text field that is linked to the same field in the other table.

    I have a report that will print out all visits to a project. It's data source is a query. The query gets the project name from a combo box in a form where the user chooses the project. It also gets a date range from the same form where the user supplies that date range. I am using the correct syntax within the query to pull the name and date range from the open form; I have used this syntax many times in other Access applications, and it always has worked.

    Last piece of info: the query on which the report is based has the date as the first field in the query and it is set to "sort ascending". Here's the problem:

    The entries in the report are not sorted properly. The first several will be in order, then a gap in dates, then the missing dates are "salted" throughout the remaining entries! they are all there but in the wrong order. Oddly enough, the entries in table itself have been entered in chronological order. I have dozens of projects in this database, and all the reports have this sorting problem. I have checked each date entry to make sure there is not a typo in any of the dates.

    I set this database up using the built-in functions of Access. I didn't write any code myself. I have used this "system" of creating reports from queries that use open forms to get the report criteria in several other Access databases and never had this problem. Any suggestions for a guy who doesn't write code??

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Sorting for a report has to be set in Grouping & Sorting on the ribbon.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Access reports do NOT use the SORT / ORDER By option from the query involved. Reports have a separate Sorting and Grouping option.
    Try using the report Sorting and Grouping to order the records.
    Good luck.

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

Similar Threads

  1. Sorting a subform within a Report help
    By Lorlai in forum Reports
    Replies: 4
    Last Post: 03-21-2013, 08:11 AM
  2. Sorting a report
    By tylerg11 in forum Reports
    Replies: 1
    Last Post: 12-14-2012, 03: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. Report Sorting Issue
    By cbgroves in forum Reports
    Replies: 14
    Last Post: 12-01-2011, 08:44 AM
  5. Incorrect sorting in report.
    By jonesy29847 in forum Reports
    Replies: 2
    Last Post: 06-16-2010, 05:56 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