Actually the buttons should work in a datasheet view. However in a continuous form in the runtime environment they will NOT be enabled and they will not work.
The simple solution here is add a couple of your own custom buttons to that meuu bar.
Have those buttons call VBA code that simply sets the sort to ascending, or decending.
So, for the a->z buttion, change the on-action to:
=MySortDown()
(Remember to add some new buttons here, don't use the built in one says they'll be disabled - you can use the custom menu editor to copy the graphic images form the original buttons however)
And for the sort descending button, you can use:
=MySortUp()
Then in a standard code module, place the above two functions that will be called and they can be written as follows.
Public Function mySortDown()
Dim f As Form
Dim c As Control
Set f = Screen.ActiveForm
Set c = f.ActiveControl
f.OrderBy = c.ControlSource
f.OrderByOn = True
End Function
Public Function mySortUp()
Dim f As Form
Dim c As Control
Set f = Screen.ActiveForm
Set c = f.ActiveControl
f.OrderBy = c.ControlSource & " DESC"
f.OrderByOn = True
End Function
Followup:
I don’t have a reference for what works. However, during testing you can create a shortcut that allows you to test/run your code as if it is in runtime mode.
Just use:
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"c:\program files\RidesXP\RidesXP.mdb" /runtime
The above is on one line in the shortcut (and a space between each line).
As for the datasheet sort buttons not working, no problem. I think it might depend on which buttons you lifted from the built-in ones. Regardless, my sample/example code should work for either case.