وعليكم السلام ورحمة الله وبركاته تفضل اخي الكريم Private Sub item_BeforeUpdate(Cancel As Integer) Dim r As Integer If DCount("*", "Buy_invoice", "item=" & item & " and id_invoice=" & id_invoice) > 0 Then MsgBox "صنف مكرر", vbInformation, "تحذير" Cancel = True End If End Sub   تحياتي