How do you .MovePrevious? I have a recordset that was opened with a keyset cursor type. Do I have to asign the adMovePrevious constant to the cursor? .MoveNext works fine. What am I doing wrong?
Public Function CreateRsDetails()
DBConnect True
Dim cmDetail As ADODB.Command
Dim prmName As ADODB.Parameter
Dim strName As String
Dim blnSupports As Boolean
strName = Trim(frmCobra.cboName.Text)
Set rstDgDetail = New ADODB.Recordset
With rstDgDetailadOpenKeyset
.CursorType = End With
blnSupports = rstDgDetail.Supports(adMovePrevious)
If rstDgDetail.Supports(adMovePrevious) = True Then
MsgBox "Yip"
Else
MsgBox "nope"
End If
Set cmDetail = New ADODB.Command
With cmDetail
.CommandType = adCmdStoredProc
.CommandText = "rtv_cobra_details"
End With
'Create Parameter to enter into proc
Set prmName = cmDetail.CreateParameter("Name", adVarChar, , 50, strName)
cmDetail.Parameters.Append prmName
'Exec stored Procedure and get record set
Set cmDetail.ActiveConnection = cnCobraDB
Set rstDgDetail = cmDetail.Execute
Public Function CreateRsDetails()
DBConnect True
Dim cmDetail As ADODB.Command
Dim prmName As ADODB.Parameter
Dim strName As String
Dim blnSupports As Boolean
strName = Trim(frmCobra.cboName.Text)
Set rstDgDetail = New ADODB.Recordset
With rstDgDetailadOpenKeyset
.CursorType = End With
blnSupports = rstDgDetail.Supports(adMovePrevious)
If rstDgDetail.Supports(adMovePrevious) = True Then
MsgBox "Yip"
Else
MsgBox "nope"
End If
Set cmDetail = New ADODB.Command
With cmDetail
.CommandType = adCmdStoredProc
.CommandText = "rtv_cobra_details"
End With
'Create Parameter to enter into proc
Set prmName = cmDetail.CreateParameter("Name", adVarChar, , 50, strName)
cmDetail.Parameters.Append prmName
'Exec stored Procedure and get record set
Set cmDetail.ActiveConnection = cnCobraDB
Set rstDgDetail = cmDetail.Execute