When I run this program for 12k records it gave me an error of something like "lock optimistic max. . . ". Then when I looked at the table records. . it populated about 9k records with randomID and nothing on the rest. When I tried to run it again it gave me an error " Current Recordset does not support updating. This maybe a limitation of the provider, or the selected locktype". Where can I set the properties to allow updating and turn off the lock properties. I could potentially have to update about 60k records with randomID. - Thanks
Dim db As ADODB.Connection
Dim fld As Field
Dim rst As New Recordset
Dim strSQL As String
Dim strTableName As String
Dim RandomID As Double
' Place a random number in the new field for each record
Set db = CurrentProject.Connection
rst.Open "tblAllAddresses", db, adOpenKeyset
rst.MoveFirst
Do
Randomize
rst![RandomID] = Rnd() * 1000000
rst.Update
rst.MoveNext
Loop Until rst.EOF
rst.Close
Set rst = Nothing
Dim db As ADODB.Connection
Dim fld As Field
Dim rst As New Recordset
Dim strSQL As String
Dim strTableName As String
Dim RandomID As Double
' Place a random number in the new field for each record
Set db = CurrentProject.Connection
rst.Open "tblAllAddresses", db, adOpenKeyset
rst.MoveFirst
Do
Randomize
rst![RandomID] = Rnd() * 1000000
rst.Update
rst.MoveNext
Loop Until rst.EOF
rst.Close
Set rst = Nothing