Sub VeriDuzen()
t1 = Timer
Dim ADO_RS As Object
Set ADO_RS = CreateObject("adodb.recordset")
SQL = "select [veri],[Kimlik] from Table1 order by [Kimlik]"
CurrentDb.Execute ("update table1 set [Alan1]=0")
ADO_RS.Open SQL, CurrentProject.Connection, 1, 3 ', 1
With ADO_RS 'loop
If Not .BOF And Not .EOF Then
.MoveFirst
While (Not .EOF)
If .Fields(0) <= 20 Then xSay = 0 Else xSay = xSay + 1: CurrentDb.Execute ("update table1 set [Alan1]=" & xSay & " where [Kimlik]=" & .Fields(1)) ' .Fields(1) = xSay
.MoveNext
Wend
End If
End With
Debug.Print Timer - t1
End Sub
aşağıdaki kodu dener misiniz ? doğrudan alan1 verilerini güncelliyor