اخواني الافاضل عملت كود وهو يقوم بالغرض ولكنه بطي بسبب كثر السجلات
فهل من بديل وهذا الكود
Dim rst As DAO.Recordset
Dim bb As Integer
Dim i As Integer, RC As Integer
Set rst = CurrentDb.OpenRecordset("SELECT * FROM [اقمشة]")
rst.MoveLast: rst.MoveFirst
RC = rst.RecordCount
For i = 1 To RC
rst.edit
b = Nz(DSum("[quntt]", "Data", "komash='" & rst!komash & "'"))
R = Nz(DSum("[quntt1]", "Data", "komash1='" & rst!komash & "'"))
s = Nz(DSum("[quntt2]", "Data", "komash2='" & rst!komash & "'"))
f = Nz(DSum("[quntt3]", "Data", "komash3='" & rst!komash & "'"))
m = Nz(DSum("[quntt4]", "Data", "komash4='" & rst!komash & "'"))
n = Nz(DSum("[quntt5]", "Data", "komash5='" & rst!komash & "'"))
k = Nz(DSum("[quntt6]", "Data", "komash6='" & rst!komash & "'"))
y = Nz(DSum("[quntt7]", "Data", "komash7='" & rst!komash & "'"))
rst("qunt4").Value = b + R + s + f + k + m + n + y
rst.Update
rst.MoveNext
Next i
MsgBox " تم تحديث السجلات الى الجدول بنجاح ", vbInformation, "تنبيه"
rst.Close
Set rst = Nothing