Results 1 to 12 of 12
  1. #1
    mdavid is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    160

    how to add sort arrows to header in tabular form

    Hi,


    In tables I have up/down arrows in each column header allowing me to sort the data by that column.
    How can I do this in forms displaying tabular data - ie. add up/down arrows to each column header in the form?

    Thanks for any help
    David

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Form must be in Datasheet view.
    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
    mdavid is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    160
    Continued searching, and found that right clicking in a cell of a tabular form gives the option to sort the data by that column.
    Guess that's the closest I'm going to get?

    Thanks
    David

  4. #4
    mdavid is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    160
    Hi June7, Tried Datasheet view, displayed only a single record and no sort arrows

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Works for me. Maybe you need to provide image or database.
    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.

  6. #6
    mdavid is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    160
    Hi June7,
    Here's the accdb - zipped

    Thanks
    David
    Attached Files Attached Files

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    The form is in Continuous view, not Datasheet.

    AllowDatasheet property is set to No.
    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.

  8. #8
    mdavid is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    160
    In datasheet view can I put command button on each row?

  9. #9
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    You can program this functionality into a continuous form , something like (Assuming your field was called Status)

    Code:
    Private Sub Status_Label_Click()
    ' reorder data on form sort by status
    If Me.OrderBy = "Status" Then
      Me.OrderBy = "Status DESC"
    Else
      Me.OrderBy = "Status"
    End If
    Me.OrderByOn = True
    End Sub
    You could also change the label to reflect the change.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    No, buttons are not available in Datasheet view, however a textbox can be made to act like one.

    If sorting is all you want, not filtering, then Minty's suggestion may be appropriate.
    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.

  11. #11
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    For an example using a continuous form see the Student Target Grade Explorer example http://www.mendipdatasystems.co.uk/m...ter/4594454290
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  12. #12
    mdavid is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    160
    Thanks for all your help,
    Much appreciated
    David

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

Similar Threads

  1. Sort and count in header
    By johngmurphy1@msn.com in forum Access
    Replies: 1
    Last Post: 02-06-2019, 09:36 AM
  2. Replies: 13
    Last Post: 11-12-2017, 01:27 AM
  3. Replies: 3
    Last Post: 05-29-2015, 09:19 AM
  4. Sort button in the Form Header
    By trident in forum Reports
    Replies: 2
    Last Post: 04-21-2015, 07:12 AM
  5. Group Header and then a Sort
    By bbulla in forum Reports
    Replies: 1
    Last Post: 09-29-2011, 09:56 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