Results 1 to 11 of 11
  1. #1
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451

    form order


    ok, this should be a simple question but since I'm learning as I go I like to come here for suggestions. I have a form with two control buttons that allow the operator to scroll thru the shifts. this is based upon the primary key and actually I show it to him but have it locked so he can't mess with it. it automatically defaults to assenting order which forces the user to scroll thru all his shifts from the start. can I change a setting or something to have this open to the last record or descending order?

  2. #2
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    Database71.zip
    attached is the example. I would like the production page to open to the newest record instead of the first. please help

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    You can base the form on a query that includes the desired sort, or set the Order By property of the form. I'd probably do the former.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    Thanks pbaldy. I like simplicity so what would I set the order by property to, descending?

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    One way, in VBA:

    Code:
    Private Sub Form_Load()    
      Me.OrderBy = "DailyProdID DESC"
      Me.OrderByOn = True
    End Sub
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    thanks pbaldy, working in vba in new to me. do I just copy and paste into the order by property?

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    ok, here's something new. the code worked great pbaldy but currently the DB's are all for a individual/machine and i'm going to a split DB design with multiple people on the single DB. how do i modify the code per line? here's my SQL if i do it that way-
    SELECT DailyProductionT.DailyProdID
    FROM DailyProductionT
    WHERE (((DailyProductionT.LineID)=[Forms]![DailyProductionF]![LineID]))
    GROUP BY DailyProductionT.DailyProdID
    ORDER BY DailyProductionT.DailyProdID DESC;

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    I would expect that SQL to still work, presuming each user has their own copy of the front end, which is the normal setup.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    yes, each user will have their own copy of a front end. i'll give it a try, thanks again.

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,643
    No problem, post back if you have trouble.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Form Order - Tabs
    By alexandervj in forum Access
    Replies: 1
    Last Post: 12-05-2013, 06:03 PM
  2. Tab order in Form
    By Darth21 in forum Forms
    Replies: 4
    Last Post: 04-19-2013, 07:42 AM
  3. Allow more than order in an ORDER form.
    By kiko in forum Access
    Replies: 37
    Last Post: 04-19-2013, 05:30 AM
  4. How to order columns in ascending order?
    By darkingthereturn in forum Access
    Replies: 5
    Last Post: 06-18-2012, 05:24 AM
  5. Replies: 1
    Last Post: 11-07-2010, 11:04 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