ADODB find error "Rowset does not support scolling backward"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

good day.

i am trying to find the amount paid on a transaction previous to a certain
transaction i wanted to find on certain table opened using ADODB recordset....

-------------

Dim rst As ADODB.Recordset

Set rst = New ADODB.Recordset

rst.Open "Select TransactionID,MonthlyBillID,AmountPaid from [Customer
Monthly Bills] where TransactionID=" & TransactionID & " ORDER BY
MonthlyBillID", CurrentProject.Connection

If rst.EOF Then
MsgBox "No past transactions found from this customer", vbCritical,
"Customer Monthly Bills Entry Form"
Else
rst.movefirst
rst.Find "MonthlyBillID = " & MonthlyBillID, , adSearchForward, 0
rst.moveprevious
PreviousAmount = rst.fields.item(2).value
End If
rst.Close
Set rst = Nothing
 
im getting an error "Rowset does not support scrolling
backward." im sure i was searching forward and that its not
EOF/BOF yet. pls help.

What is the default ADO recordset type when you don't declare it? Is
it perhaps a forward-only recordset?
 
David W. Fenton said:
What is the default ADO recordset type when you don't declare it? Is
it perhaps a forward-only recordset?

According to the documentation, "If you don't specify a cursor type, ADO
opens a forward-only cursor by default."
 
According to the documentation, "If you don't specify a cursor
type, ADO opens a forward-only cursor by default."

(as you might guess, I already knew that, and was trying to get the
poster to look it up for himself)
 
X_X oh yeah. me bad. was too tired to figure that out yesterday.

i got it now. and thanks to both of u.
 
Back
Top