Results 1 to 4 of 4
  1. #1
    Lamyatt is offline Novice
    Windows 7 32bit Access 2000
    Join Date
    Oct 2012
    Posts
    2

    Sorting field in table

    Hi Newbie here,
    I have a table that i would like to sort the records in one field Ascending.
    I would like for the field to be updated after the record is entered so that the records in the field are all ways in a alphanumerical order
    I have put [SSB-CW].Square in the Order BY properties of the table. The Table is called SSB-CW and the field to sort is called Square. As i enter the records they stay in the order entered. When the table has been closed and then re-opened the records are sorted.


    Do i need to design a form and set the lost focus property with the SQL [SSB-CW].Square
    Simple if you know how i suppose!!!
    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    After entering new record, the recordset has to be refreshed to enforce the sort order. This applies to table, query, form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Lamyatt is offline Novice
    Windows 7 32bit Access 2000
    Join Date
    Oct 2012
    Posts
    2
    Hi June7
    Thanks for the quick reply. Could you please advise how to refresh the recordset after the last field loses focus or exits
    Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Click the Refresh button on toolbar.

    From form can use code in some event. Trick is figuring out what event.

    Be aware, Refresh or Requery action will set focus on the first record.

    Why is this sort order important?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Sorting by alphanumeric field
    By RonL in forum Access
    Replies: 1
    Last Post: 10-20-2012, 05:06 PM
  2. Replies: 5
    Last Post: 05-25-2012, 12:02 PM
  3. Field Sorting on Reports
    By netchie in forum Access
    Replies: 5
    Last Post: 07-25-2011, 11:45 AM
  4. Sorting on field other than primary key
    By usmcgrunt in forum Access
    Replies: 24
    Last Post: 08-30-2010, 07:15 PM
  5. sorting a field in report
    By Philangr8 in forum Reports
    Replies: 3
    Last Post: 08-26-2009, 05:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums