0
votes

I have a client that doesn't actually have Access, so they use the Access Runtime 2016 to use my program. In the runtime version there is no ribbon, but mostly they manage without.

There is only one issue, there is a continuous form that the user needs to be able to sort ascending or descending. In the full version of Access, there's a convenient little button to take care of that.

I found a solution here, but it doesn't work when I try it. I'm assuming that it's because my client is using Runtime 2016. There is also a question that addresses this for Access 2003, but there's no way (as far as I know) to make buttons for Access 2007 runtime and later.

What is the recommended method to provide sorting (and filtering) for Access 2016 runtime?

1

1 Answers

1
votes

Personally I never let my customers use the Access UI for sorting or anything else, I bind the double click event of the header in any sortable column to code that uses the OrderBy and OrderByOn properties of the form to set the sorting up using VBA.

Here is sample code:

Private Sub s_Description_DblClick(Cancel As Integer)

If Me.OrderBy = "Description" Then
    Me.OrderBy = "Description DESC"
  Else
    Me.OrderBy = "Description"
  End If
Me.Requery

End Sub