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

ADO Bookmark Property 2

Status
Not open for further replies.

sttcharl

Programmer
Dec 5, 2002
29
US
I am trying to get my ADO recordset to support the Recordset.Bookmark property, but I can't seem to figure out how to get my recordset to support this, when I run RS.Supports(adBookmark) it always returns false, any ideas you have would be greatly appreciated.

Thanks,
Steve
 
Thanks that fixed the bookmark problem but created another, now instead of my data being in order by account number say 1, 2, 3, etc.. it is 2, 3, 4, 5, 6, 1 where the number that is at the end should be at the beginning. Here's my load function if it helps.
Dim connectionString As String
Set DB = New ADODB.Connection
Set RS = New ADODB.Recordset

DB.Provider = "Microsoft.Jet.OLEDB.4.0"
DB.Properties("Data Source") = ".\FCWC-db.mdb"
DB.Open
Set RS.ActiveConnection = DB
RS.CursorLocation = adUseClient
RS.CursorType = adOpenDynamic
RS.LockType = adLockOptimistic
connectionString = "SELECT BillingNumber, " _
& "Total, Name, " _
& "Address1, Address2, " _
& "City, State, " _
& "Zip, Phone1, " _
& "Contact1, Extension1, " _
& "Phone2, Contact2, " _
& "Extension2, CellPhone, " _
& "Notes FROM BillingAccount"

RS.Open connectionString, DB, adOpenDynamic, adLockOptimistic
Call DispForm

Thanks for the help,
Steve
 
Append an "ORDER BY BillingNumber" to the end of your Select statement, and you should get it back in the proper order every time. One common misconceptions about selecting records from a table is that, if it came back in the right order once (without using an Order By clause) then it will come back in that order every time. This simply is not true. If you want something to come back in a particular order, you must specify it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top