حاولت بهذا الكود ولم افلح
On Error Resume Next
Dim Rs As DAO.Recordset
Set Rs = Forms!FrmFatora!Subvnt.Form.RecordsetClone
Dim Rc As Integer, x As Integer
x = 0
Rc = Rs.RecordCount
If Rc > 0 Then
Rs.MoveFirst
Do Until Rs.EOF
'اذا وجد السجل
If Rs!Bard = Brcod Then
'تحريره
Rs.Edit
Rs!Qnt = Rs!Qnt + 1
Rs.Update
[Subvnt]![Bard] = Null
[Subvnt]![Name] = Null
[Subvnt]![Prix] = Null
' Exit Sub
End If
Rs.MoveNext
Loop
End If
Rs.AddNew
[Subvnt].SetFocus
[Subvnt]![Qnt] = 1
[Subvnt]![Bard] = DLookup("[Barcod]", "TblAchet", "[Barcod]= [Brcod]")
[Subvnt]![Name] = DLookup("[NameS]", "TblAchet", "[Barcod]= [Brcod]")
[Subvnt]![Prix] = DLookup("[Prix2]", "TblAchet", "[Barcod]= [Brcod]")
[Brcod] = ""
[Brcod].SetFocus
Rs.Update
[Subvnt]![Bard] = Null
[Subvnt]![Name] = Null
[Subvnt]![Qnt] = Null
[Subvnt]![Prix] = Null
Undo