Results 1 to 7 of 7
  1. #1
    Desstro's Avatar
    Desstro is offline Competent Performer
    Windows XP Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    185

    Sort oldest to newest on form

    I have a form that is based off of a query. They both contain field: start date and field: end date.



    The query is filtered to sort oldest to newest however the form does not show as oldest to newest. I tried tinkering around with the form properties but have had no luck.

    I also went as far as to set oldest to newest on the table that the query is based off of...still no luck.

    Is there a way I can make the form, (which by the way will be on lock down for the end user) return the data from the query as sorted from oldest to newest?

    OOps...just realized I didn't set this as a (?) in the forum...srry.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Does your query have an OrderBy clause? If so, would you post it please so we can see it?

  3. #3
    Desstro's Avatar
    Desstro is offline Competent Performer
    Windows XP Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    185
    It does not have an OrderBy clause. The only criteria in the query is under

    "shift" =1 or =3
    "StartDate" <=Date()
    "EndDate" >=Date()

    I sorted the query by right clicking the StartDate header on the datasheet view and selecting oldest to newest, save.

    How do I set an OrderBy clause?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You need to also select the Sort criteria in the column you wish in the design view of the query. The filters you selected do not sort but just constrain the records returned.

  5. #5
    Desstro's Avatar
    Desstro is offline Competent Performer
    Windows XP Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    185
    I think I figured it out. In the queries properties I set sort Ascending. Seems to work.

  6. #6
    Desstro's Avatar
    Desstro is offline Competent Performer
    Windows XP Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    185
    LOL...thanks RuralGuy. Will mark as solved.

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

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

Similar Threads

  1. Query From Newest Date
    By SSgtJ in forum Queries
    Replies: 2
    Last Post: 01-21-2010, 01:51 PM
  2. Sort by even or odd number
    By sammer021486 in forum Queries
    Replies: 7
    Last Post: 11-23-2009, 12:30 PM
  3. How to sort by three sort orders
    By captgnvr in forum Access
    Replies: 4
    Last Post: 11-09-2009, 07:30 AM
  4. Access 2003, sort order property of a form
    By Rick West in forum Forms
    Replies: 11
    Last Post: 09-17-2009, 08:28 PM
  5. Sort
    By mmp97 in forum Access
    Replies: 1
    Last Post: 12-18-2008, 10:14 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