Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Posts
    24

    Unanswered: Sort Form from Table

    I have several tables with information, one of which consists of ProductID (Primary Key), Product Name, etc..

    My main form is made up of different tables, and I was wondering how I can have the form sort ascending based on the ProductName instead of the ProductID.

    I can right click on the text field in the form, select "Sort Ascending", and everything is fine. But, when I then right click and select "Remove Filter/Sort" it defaults the sorting back to the ProductID.

    Is there anything that will make the default view "Ascending" on the form? Please help, this is annoying me.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Sort Form from Table

    Originally posted by lunch36
    I have several tables with information, one of which consists of ProductID (Primary Key), Product Name, etc..

    My main form is made up of different tables, and I was wondering how I can have the form sort ascending based on the ProductName instead of the ProductID.

    I can right click on the text field in the form, select "Sort Ascending", and everything is fine. But, when I then right click and select "Remove Filter/Sort" it defaults the sorting back to the ProductID.

    Is there anything that will make the default view "Ascending" on the form? Please help, this is annoying me.
    Is the form bound to a table? If it is thru the RowSource then mod the uderlying query to ORDER BY the other column ...

  3. #3
    Join Date
    Jan 2003
    Posts
    24

    Re: Sort Form from Table

    Originally posted by M Owen
    Is the form bound to a table? If it is thru the RowSource then mod the uderlying query to ORDER BY the other column ...
    Not exactly sure, but I believe it is bound...the main form I am trying to sort basically consists of one main table, and through several subforms, additional tables are accessed.

    The main form does not utilize a query though. I wish it did, but too late to fix.

    I just want the "remove filter/sort" to retain the sort ascending properties.

  4. #4
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    Have yout tried the Order By property of the form? It is on the Data tab of the Properties. I have used it in the past but didn't have consistent success with it. The only way I know how to force it to sort the way you want, is to based the form on the a query that is sorted. I am not sure why you are saying its too late, but it can always be changed.

  5. #5
    Join Date
    Jan 2003
    Posts
    24
    I was able to change the data source to point to a query based on the main table, and I was able to get it to sort ascending every time. Thank you everyone for your help.

Posting Permissions

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