الحمد لله لقد توصلت إلى الكود الذي يؤدي الغرض حسب ما فهمت أنا:
On Error Resume Next
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("tbl_wared_motaba")
x = 1
rs.MoveFirst
For I = 1 To DCount("*", "tbl_wared_motaba")
If Nz(rs!id_emp_w, 0) = Nz(id_m, 0) And Nz(rs!sn_user_Recv, 0) = Nz(sn_user_Recv, 0) And Nz(rs!sn_user_Send, 0) = Nz(sn_user_Send, 0) And Nz(rs!taxt_Tasera, 0) = Nz(taxt_Tasera, 0) And Nz(rs!dd_end, 0) = Nz(dd_end, 0) And Nz(rs!Date_End, 0) = Nz(Date_End, 0) And Nz(rs!Date_start, 0) = Nz(Date_start, 0) Then
x = 0
End If
rs.MoveNext
Next I
If x = 0 Then
msgBox ("لقد تم تسجيل هذه البيانات من قبل")
Else
Me.frm_wared_motaba.SetFocus
rs.AddNew
rs!id_emp_w = id_m
rs!sn_user_Recv = sn_user_Recv
rs!sn_user_Send = sn_user_Send
rs!taxt_Tasera = taxt_Tasera
rs!dd_end = dd_end
rs!Date_End = Date_End
rs!Date_start = Date_start
rs.Update
msgBox ("لقد تم تسجيل البيانات بنجاح")
End If
Me.Requery
Me.frm_wared_motaba.Requery
rs.close
Set rs = Nothing
المراسلات.rar