Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to sort on recordsetclone?

Status
Not open for further replies.

Zygor

Technical User
Apr 18, 2001
271
US
I have a form that builds a strcriteria to be used as a form filter. The user selects an item from one or more combo boxes and the records are filtered.

I want them to be able to select a column header and have the records sorted using that column. But at that point the records are based on a recordsetclone.
 
If the form is based on it, it is not a recordsetclone, even if it started that way. Please post a little code.
 
Posted too soon. Have you considered OrderBy and OrderByOn?
 
Maybe I am mistaken.
The form's recordsourse is a query. The combobox selection(s) are choosen and then they hit a apply selection button
which builds the strCriteria then applies it
DoCmd.ApplyFilter "", strCriteria

If the user wants to sort the result, I don't want to apply the filter again in case they made another selection without hitting the apply selection button. I thought it best to use a recordsetclone of the current selection and order it.
 
You should be able to use OrderBy, as I mentioned above. Sorting the recordsetclone will not sort the data in the form. The recordsetclone is a clone of the recordset, that is, a copy.
 
Thanks Remou,

I don't think I understand the syntac for what I need to do.
 
Look up OrderBy in the help. It goes something like:

[tt]Me.OrderBy="Surname"
Me.OrderByOn=True[/tt]
 
Thanks again. This site is soo helpful to me. I appreciate the time you guys take to respond and help out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top