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?
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?