Results 1 to 7 of 7
  1. #1
    nhpls is offline Novice
    Windows XP Access 2003
    Join Date
    May 2012
    Posts
    4

    sorting question

    I have a database. There's a sub form with


    order #, activity, date, end date

    Right now it's sorted by order number which is just a number input. But if someone has a new task or one thing gets started at an earlier date, that goes in the middle, they'll have to rename all other other order numbers. What I need is to order it by date, and if it's there's two activities on the same date have whoever is putting the data in to pick which one goes first.

    Any idea about how I would go about this?

    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    You can base the subform on a query that includes the desired sort, or use the OrderBy property of the form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    nhpls is offline Novice
    Windows XP Access 2003
    Join Date
    May 2012
    Posts
    4
    Ok so it orders by date, how do I get that second level of picking which activity from that date is first, second, third etc if there are doubles?

    I'm looking up Orderby right now.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    If you want the second level to be user selectable/maintainable, you need to include a field to save it. Depending on your specifics, I suspect it will get a little tricky, but it's certainly doable.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    nhpls is offline Novice
    Windows XP Access 2003
    Join Date
    May 2012
    Posts
    4
    How specifically would I do that?
    I'm very inexperienced with Access and I haven't been able to get this done all day.

    And I do appreciate your very quick responses.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Like I said, this could get tricky. If you just want the user to enter a value for each record, it's fairly simple. Add a field called "SortField" or whatever to the table and form, and let the user input a value. Then include that field in your sorting. If you want a Netflix type thing where you change the sort value of a record from 10 to 1 and all the other values change to accomodate that (the existing 1 changes to 2, 2 to 3, etc), that will be tricky.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    nhpls is offline Novice
    Windows XP Access 2003
    Join Date
    May 2012
    Posts
    4
    Right now it's sorted by order which is just which 1, 2, 3, 4... etc. that the user inputs to show which ones first, 2nd, third instead of by date. The problem is when something gets moved up or down, they have to manual go and change everything else, say move something from 10 to 6, they need to rename the others.

    I'm just trying to figure out the simplest way to get rid of their manual work. I guess I could go and remove that order column, add a new one like dupe dates and if a date is duped they input which ones first, and then in query? I make it sort dupe date first then date and get a table from that? I'd have to manual go back and edit the ones already in there correct?

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

Similar Threads

  1. Replies: 6
    Last Post: 03-15-2012, 09:50 PM
  2. Replies: 11
    Last Post: 01-12-2012, 07:55 PM
  3. IP Sorting
    By neo651 in forum Access
    Replies: 4
    Last Post: 05-24-2011, 01:08 PM
  4. Sorting
    By BorisGomel in forum Access
    Replies: 0
    Last Post: 04-25-2011, 11:22 AM
  5. Need Sorting Help
    By rbpd5015 in forum Access
    Replies: 1
    Last Post: 09-28-2009, 07:39 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