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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"order by" in recordset

Status
Not open for further replies.

leangross

IS-IT--Management
Jul 3, 2002
84
0
0
PH
I have a recordset and the textboxes in my form is bounded to that recordset.

I use this statement in my program:
"select * from collection where posted = 1 order by account_no"

It seems that if the recordset is executed with "ORDER BY" you can not move the record pointer backward. Is there a way I can order the recordset and at the same time i can do .moveprevious, .movenext?

Thanks in advance!!!!
 
Whether or not you can move your cursor backwards only depends on the cursor you've opened. You probably opened a forward only cursor (which is the default when opening a recordset and which is the only cursor returned by the execute method of a connection object).
Greetings,
Rick
 
I always use

rst.Open (sqlstatement), ConnectionString, adOpenDynamic, adLockOptimistic

Garty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top