Hello,
Can you provide some further advice please on how to use the seek command thru QODBC? Or is there another way to optimize code that updates customers in the customers table. I have code which establishes which customers need to have their address updated, and then loops through each one. It is taking way too long; I have 14000 customers in my customers table. Are there any suggestions to speed this up?
Thank you.
Here is a sample of my code:
Dim db As Database
Dim rso As Recordset
Dim rsrec As Recordset
Dim thispolicy As String
sqlitems = "Select * from QueryThatFindsUpdatedCustomers"
Set db = CurrentDb
Set rs = db.OpenRecordset(sqlitems)
thisListID = rs.Fields("ListID").Value
SQL2 = "Select * from Customer WHERE listID like '"
SQL2 = SQL2 & thisListID & "'"
Set rsrec = db.OpenRecordset(SQL2)
address2 = rs.Fields("addressfromaccess").Value
rsrec.Edit
rsrec.Fields("billaddressaddr2").Value = address2
rsrec.Update
rsrec.Close
rs.MoveNext
Loop
|