Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Apr 2005
    Location
    Kansas City, Missouri, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with Sort Order in Subform (Access 2000)

    I am having a problem with the sort order in a subform. I have tried the OrderBy property on the subform and nothing changes. I have also ordered it ascending in the underlying query and it still remains the same. It takes the very last entry and places it on top. I want it ascending, I though that would be the default. What simple thing am I missing here?
    Thanks

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Problem with Sort Order in Subform (Access 2000)

    If you create a query as the record source for the subform and sort it in the fashion you wish, the subform should be sorted correctly. So something else is going on here - if you simply display all the records by opening the subform in display mode outside of the parent form, are things OK. If so, it probably has something to do with the linkage between the parent form and the subform.
    Wendell

  3. #3
    New Lounger
    Join Date
    Apr 2005
    Location
    Kansas City, Missouri, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problem with Sort Order in Subform (Access 2000)

    Wendell,
    Yes, when I look at the subform without parent form it sorts correctly. How could linking the forms affect the sort order when it is specified on the underlying query to sort a specific field ascending?
    Stacy

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Problem with Sort Order in Subform (Access 2000)

    Subforms are normally used to show a subset of the records in a table or query that releate to the record being displayed in the parent form. If you look at the properties of the subform control on the parent form, you will see the linkage properties I mentioned - see the attached JPEG below. This shouldn't normally affect the sort order on the subform, but if you have an unusual set of linking fields, you can get some bizzare results that look like the data has been scrambled. I would make sure there is no Sort Order property in the subform form as well. Hope this helps debug what is going on.
    Wendell

  5. #5
    New Lounger
    Join Date
    Apr 2005
    Location
    Kansas City, Missouri, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problem with Sort Order in Subform (Access 2000)

    Wendell,
    Master and Child fields are exactly the same: "Company_ID". There is no sort order on the subform, the parent form. Only on the underlying data.
    I am at a loss. The subform is in datasheet view would that make a difference? When I right click and sort the column is goes exactly as it should.
    Stacy

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

    Re: Problem with Sort Order in Subform (Access 2000)

    Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

Posting Permissions

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