Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009

    Unanswered: Sorting a Subform

    I created a Form which has a subfrom where people can add comments. When the form is chosen from the switchboard, I want it to load the records with the comments in descending order based on date.

    Despite several searches I have yet to turn up a solution for this. Any help is greatly appreciated!

  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    what is the .recordsource of the subform will look something like
    SELECT this, that FROM here WHERE something
    change to:
    SELECT this, that FROM here WHERE something ORDER BY yourDateField DESC

    currently using SS 2008R2

  3. #3
    Join Date
    Jan 2009
    The Source Object is the form titled "Add Comments" which uses the record source tbl_Comments

    Therefore I opened the "Add Comments" form in design view. In the property sheet I changed "order by" to: [tbl_Comments].[CommentDate] DESC

    Then I set Order By On Load to Yes

  4. #4
    Join Date
    Nov 2007
    Adelaide, South Australia
    Change the Record Source to

    SELECT * FROM tbl_Comments ORDER BY CommentDate DESC;
    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