Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Oct 2002
    Location
    Carol Stream, Illinois, USA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sorting problem (xp)

    I have an inventory tracking db with a subform that logs transactions in the main form. There are 31 products that we track at this time. The first 20 sort correctly by date, but the remaining 11 are all sorted upside down by date - most recent at the top, oldest at the bottom. Any ideas?

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

    Re: sorting problem (xp)

    Is the record source of the subform sorted by date? If the record source is a table, create a query based on the table, and set the desired sort order in the query design grid. Save the query, and use it as record source for the subform.

  3. #3
    New Lounger
    Join Date
    Oct 2002
    Location
    Carol Stream, Illinois, USA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sorting problem (xp)

    Please forgive the ignorance. Where do I find the record source?

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

    Re: sorting problem (xp)

    Open the subform in design view.
    Activate the Properties window (F4)
    Activate the Data tab.
    The Record Source property is at the top of this tab. It can be the name of a table or of a query, or it can be a so-called SQL string (SELECT ...). You can edit the record source by clicking in it, and then clicking the three dots ... on the right hand side.

  5. #5
    New Lounger
    Join Date
    Oct 2002
    Location
    Carol Stream, Illinois, USA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sorting problem (xp)

    Thanks for the patience. In the Query Builder, I selected "Transaction Date" in the Transaction table, sorted "ascending". That showed every transaction for all products in every product, rather than just the ones that correspond to the currently selected product.

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

    Re: sorting problem (xp)

    Open the main form in design view.
    Click once on the subform. Don't click a second time; that would select something within the subform.
    Activate the Data tab of the Properties window.
    Changing the record source of the subform has probably cleared the Link Child Fields and Link Master Fields properties.
    Click in one of these, then click the three dots ... on the right hand side.
    Select the field(s) that link the main form to the subform.

  7. #7
    New Lounger
    Join Date
    Oct 2002
    Location
    Carol Stream, Illinois, USA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sorting problem (xp)

    Got it! Didn't work at first because when I built the query, I only used the transaction date for sorting. Then when I checked the Link Child Fields and Link Master Fields, the previous fields were unavailable. So I made the other fields in the transaction table part of the query, and it worked just fine - all sorted correctly. Thanks for your help, Hans!

Posting Permissions

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