Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rs.MovePrevious

Status
Not open for further replies.

elibb

Programmer
Oct 22, 2001
335
MX
hi... im using a recordset to make a query... im doing something like this:

Dim rs and new adodb.recordset
rs.open query, connection

and then i asign all my textboxes to the rs..
text1.text=rs!Value1
text2.text=rs!Value2

and so on...
now when i want to move on the rexordet, i have a button, called next, and it does this:

rs.moveNext
text1.text=rs!Value1
text2.text=rs!value2

and it works fine.. but i want to have a previous button also... but when i do this:

rs.MovePrevious
text1.text=rs!Value1
it sais that the objext cannt have than property or method..
does anybody know how todo that??

thank you very much.

Eli
 
try
rs.open sqlstr,dbcon,adopendynamic,adlockoptimistic

when opening your recrdset, im pretty sure this will work,

case
 
Have you set the recordset's CursorType property in your code, and if so, what have you set it to?

Also, you'll need to put in some checking to make sure the you never MovePrevious when you're at BOF.
Something like this...

rs.MovePrevious
If rs.BOF Then
rs.MoveFirst
End If

Write back
Josh
 
Thank you Case.. it worked perfecty!!!

Josh: ive never used a cursor type? what is it for??

thank you both.

Eli
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top