Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Order of form entries in a table

    I've been using Access 2002. I've moved my databases to a new computer that has Access 2010. I set up a new database table and corresponding form. When I type a new entry into the form I would like this to go into the table in ascending order based on the first field. As it is now, new entries just get added as the last item in the table.
    Clark

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Clark,

    There is no need to worry about the order of data in a table and no way to really control it easily. Just view the table in a query sorted on the fields you choose. As a general rule the Table should be manipulated with queries/forms (where you can control the display order easily) vs direct manipulation of the table.

    Of course if you are set on maintaining the order of things in the table itself it can be done by viewing the table, sorting on the desired field and then close the table and when prompted SAVE the changes.
    Table sort.JPG
    HTH
    Last edited by RetiredGeek; 2014-01-02 at 13:48.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts
    One of the principles of the relational model is that the tuples (records) have no order. So, what you ask is technically impossible to ensure. This doesn't mean that you cannot retrieve the table records according to a specified order, but you do so using a query, as RetiredGeek suggested.

    Whenever you use a relational database, ordering the records can only be assured through a ORDER BY clause in a given query. Any other way cannot ensure results that can be reproduced every single time.
    Rui
    -------
    R4

Posting Permissions

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