Hi Larshg,
This one is really sweet and I'm sure lots of folks would appreciate it:
Open up the VB module "behind" the form by finding the button on the toolbar that has a control tip text that says "code" (**Could someone tell me what that icon is supposed to be please?)
Place your sub form in design view. Paste this in right below the "Option Compare Database" or if you have it, just below "Option Explicit":
Dim ctl As Control, fSetting As Boolean
Private Sub SortMe()
on error Resume Next
Set ctl = Me.ActiveControl
DoCmd.RunCommand acCmdRemoveFilterSort
ctl.SetFocus
If fSetting = True Then
DoCmd.RunCommand acCmdSortAscending
fSetting = False
Else
DoCmd.RunCommand acCmdSortDescending
fSetting = True
End If
End Sub
Close the VB module.
Now on each of the fields that you might like to sort, find their On Double-click event. Select "event procedure", click "..." to open the module again and automatically label a sub, then add this:
SortMe
You'll have to keep doing this for each field. Once done close and save. Open your form and go to a column and double-click. Then double-click again. Good? Gord
ghubbell@total.net