Clay, can't remember where I got this code, so can't give credit where it's do. Basically you
design 2 identical command buttons and place one directly on top of the other. Set the visible
property of one of them to false. Now run the following code (replace names of controls/fields to
suit):
Private Sub cmdSortAscMyField_Click()
On Error GoTo cmdSortAscMyField_Click_Err
DoCmd.Echo False, "Sorting records ..."
Screen.ActiveForm.AllowAdditions = False
DoCmd.GoToControl "MyField"
DoCmd.RunCommand acCmdSortAscending
Me![cmdSortDescMyField].Visible = True
Me![cmdSortDescMyField].SetFocus
Me![cmdSortAscMyField].Visible = False
DoCmd.Echo True, ""
Exit Sub
cmdSortAscMyField_Click_Exit:
DoCmd.GoToRecord , , acFirst
Exit Sub
cmdSortAscMyField_Click_Err:
Resume cmdSortAscMyField_Click_Exit
End Sub
***************************************************************
Private Sub cmdSortDescMyField_Click()
On Error GoTo cmdSortDescMyField_Click_Err
DoCmd.Echo False, "Sorting records ..."
Screen.ActiveForm.AllowAdditions = False
DoCmd.GoToControl "MyField"
DoCmd.RunCommand acCmdSortDescending
Me![cmdSortAscMyField].Visible = True
Me![cmdSortAscMyField].SetFocus
Me![cmdSortDescMyField].Visible = False
DoCmd.Echo True, ""
Exit Sub
cmdSortDescMyField_Click_Exit:
DoCmd.GoToRecord , , acFirst
Exit Sub
cmdSortDescMyField_Click_Err:
Resume cmdSortDescMyField_Click_Exit
End Sub
Hope it helps!