Thread: Sorting issue

    #1
  1. No Profile Picture
    matt1174
    Guest
    Devshed Newbie (0 - 499 posts)

    Sorting issue


    Hi all

    I have a database, of quite a size, one area of which logs all the company's tools.

    When I created the list, then the subsequent form, I rather short sightedly neglected to sort the records into a 'logical' order.

    Upon creating the form I didn't bother with a sort and therefore the records are sorted as per the primary key, which is 'Autonumber' - the trouble with this is that when adding new tools, of an identical nature to existing tools, the record appears further down the list, rather than with others of the same type (does that make sense?).

    With the tables and forms already set, is there a way I can change the sort criteria, so instead of by Primary Key, I can change it to sort by Tool Primary number, then by Tool Secondary number?

    All help and suggestions as ever greatly appreciated.
  2. #2
  3. No Profile Picture
    matt1174
    Guest
    Devshed Newbie (0 - 499 posts)
    Right - I have now sorted this matter - so all records are in order of the tool number.

    However, an issue still occurs.

    I have a drop box on the form for a quick jump to the record required, but it only sorts in order of the primary key, not by tool number - is there a way I can do this?
  4. #3
  5. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,126
    Rep Power
    4274
    the only way to obtain the order you want is through the use of an ORDER BY clause
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo