G
Greg Horwood
I have the following sample code which returns a run-time error 3251.
Private Sub btnMain_Click()
Dim rst1 As Recordset
Set rst1 = New ADODB.Recordset
rst1.CursorType = adOpenKeyset
rst1.LockType = adLockOptimistic
rst1.CursorLocation = adUseServer
rst1.Open "tblMain", CurrentProject.Connection
rst1.Sort = "KEY ASC"
rst1.Close
Set rst1 = Nothing
End Sub
The problem is with the Sort Property applied to the recordset object.
Any help greatly appreicated.
Thanks heaps
Greg
Private Sub btnMain_Click()
Dim rst1 As Recordset
Set rst1 = New ADODB.Recordset
rst1.CursorType = adOpenKeyset
rst1.LockType = adLockOptimistic
rst1.CursorLocation = adUseServer
rst1.Open "tblMain", CurrentProject.Connection
rst1.Sort = "KEY ASC"
rst1.Close
Set rst1 = Nothing
End Sub
The problem is with the Sort Property applied to the recordset object.
Any help greatly appreicated.
Thanks heaps
Greg