Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2011

    Unanswered: Acsess Report, Custom Sorting

    Bare with me. I don't know a whole lot about access.

    I need to do some custom sorting on a access report.

    I need to custom sort two different fields and the fields contain the following:

    Field 1: Hazard Status > "Open" or "Closed"

    Field 2: Spot Type > "Finding" or "Observation"

    I would like the report to sort all records with a HAZARD STATUS of "Open", then SPOT TYPE "Observation", and lastly put all the HAZARD STATUS "Closed" at the end of the report.

    I don't know VBA, so I need to do this as simplest as possible.

  2. #2
    Join Date
    Feb 2004
    Chicago, IL
    Create table(s) for the custom sort:

    Hazard Status---------SortOrder

    Then join to the tables to get the sort you want.

  3. #3
    Join Date
    Nov 2007
    Adelaide, South Australia
    HazardStatus DESCENDING, SpotType ASCENDING will do it without needing to modify any table strucutres.

    But I think he wants:

    1st: all OPEN Hazard Status, then
    2nd: All Observation spot types (regardless of Hazard Status) then
    3rd: all remaining CLOSED Hazard Status.

    If so:

    SortThis: IIf([Hazard Status]="Open",1,IIf([Spot Type] = "Observation",2,IIf(Hazard Status] = "Closed",3)))

    Add this to your underlying SQL for the report and sort by that field. Should do the trick.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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