I have never tried it before so I gave it go. As June mentioned, what you desire is not Sorting. What you are referring to is being able to change the Report's Rcordsource or Filter property. If you have grouping and sorting, you can access a group via its index. here is some example code for sorting (you are not asking about sorting).
Code:
If Me.GroupLevel(0).SortOrder = False Then
Me.GroupLevel(0).SortOrder = True
Else
Me.GroupLevel(0).SortOrder = False
End If
You could place code like this within a textbox control's DblClick event, for example. You could use differnet code, too. You could build code to affect the Filter property of the report. Here is an example. Also, you would probably want a command button in the header to remove the filter.
Code:
Dim strFilter As String
strFilter = ""
Me.FilterOn = False
Me.Filter = strFilter
If Not IsNull(Me.NameOfControl.Value) Then
strFilter = "[NameOfField] = '" & Me.NameOfControl.Value & "'"
Me.Filter = strFilter
Me.FilterOn = True
End If