Results 1 to 5 of 5
  1. #1
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199

    Sorting Problem

    I have written a query where it displays sorted data for two columns, but problem is its sorting on one column but not on another



    When checking the query seperately its giving proper output, but in form view its sorting only on one column not on another. Please help

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Your form has a place where you can put the sorting order in the forms properties.

    Open your form. Use your sort order tool bar by clicking in the fields and clicking a to Z. Do it in the sequence you desire, Field A, Field B etc. Save your form by clicking the save Icon.

    Go straight to viewing your form in edit view. You should see the code within your form's property settings for sorting. COPY IT and save it to a text file. It can get lost by you clicking save at the wrong moment.

    The best way id to write out the SQL in the form's load event and assign it to the forms recordsource.

  3. #3
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    Great i noticed i had two queries for record source and on load also, i rectified it. Thanks

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    I was double checking on my computer and it wasn't saving to form properties on sorting only on filter. I couldn't find the right code to put into the properties field for sort.

    Oh well, at least you got what you need.

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    FWIW and for anybody who cares:

    In the Sort field in the form's properties the syntax is
    QueryName.FieldName, QueryName.FieldName2

    While viewing your form you can go to advanced filter sorting from your tool bar and save your form. Then in edit view the syntax will appear in the properties box.

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

Similar Threads

  1. Sorting problem in Forms and Reports
    By glen in forum Forms
    Replies: 2
    Last Post: 02-15-2013, 02:44 PM
  2. Sorting problem
    By 1337noob in forum Reports
    Replies: 5
    Last Post: 05-07-2012, 12:23 PM
  3. Problem sorting date on query
    By system243trd in forum Queries
    Replies: 4
    Last Post: 12-02-2011, 01:05 PM
  4. Sorting by combobox problem
    By wsurritte in forum Access
    Replies: 11
    Last Post: 02-28-2011, 02:11 PM
  5. Is this a Query or Sorting problem?
    By bwrobel in forum Queries
    Replies: 2
    Last Post: 07-14-2006, 08:15 AM

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