ADODB find error "Rowset does not support scolling backward"

W

wendell remolador

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
 
D

David W. Fenton

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

Douglas J. Steele

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."
 
D

David W. Fenton

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)
 
W

wendell remolador

X_X oh yeah. me bad. was too tired to figure that out yesterday.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Newbie with SQL & ADO 1
Find code errors 1
Newbie help with SQL & ADO 2
SQL syntax and ADO 1
Recordset with Find Method 2
Find Method 0

Top