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

sort a recordset

Status
Not open for further replies.

sbdproj

Programmer
Sep 22, 2003
22
NL
Hi,

I'm having troubles sorting a recordset.
This is my code:
Dim rstMeetwaarde As ADODB.Recordset
Dim cnn1 As ADODB.connection

Set rstMeetwaarde = New ADODB.Recordset
rstMeetwaarde.CursorType = adOpenKeyset
rstMeetwaarde.LockType = adLockOptimistic
rstMeetwaarde.CursorLocation = adUseClient
rstMeetwaarde.Open "MeetwaardeSurveyMonitor_Afstand", cnn1
rstMeetwaarde.Filter = "kal_surv_id = '" & kal_SurveyMon_ID & "'"
rstMeetwaarde.Sort = "Afstand"

When I run the code it goes wrong on the line where I set the sort property.
This is the error I get:
"Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."

Anyone any ideas what's wrong in my code?
 
Is it sort or order

Hope this helps
Hymn
 
No it has to be sort. Order isn't supported by the object
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top