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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting Recordset

Status
Not open for further replies.

bmoyer23

MIS
Dec 5, 2001
46
US
I have a function (called FillList) which returns a recordset of information to populate a ListView control. When I try setting the Sort property on this recordset, I get the following error:

'Order cannot be opened'

It will allow me to set the sort to one field, but not two or more. What am I missing here?

Here is a sample of the code:

Set oRecordset = FillList(sJobNumber, sRootPath)
oRecordset.Sort = "SortOrder, JobNumber"

Thanks in advance.
 
What is SortOrder is this a column. As far as ADO goes, if that's what your suing, the sort syntax is:

oRecordset.Sort = "Field1, Field2, Field3"
Craig, mailto:sander@cogeco.ca

"Procrastination is the art of keeping up with yesterday."

I hope my post was helpful!!!
 
Why not include a "ORDER BY" clause in your SQL?

Chip H.
 
I figured out the problem.

Thanks for the responses!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top