جرب هذا
Dim ctrl As Control
For Each ctrl In Me(nm).Controls
If ctrl.Tag = "R" Then
If IsNull(ctrl) Or ctrl = "" Then
Me(nm)!NoteImg.Left = ctrl.Left
Me(nm)!NoteImg.Top = ctrl.Top + ctrl.Height
Me(nm)!NoteImg.Visible = True
ctrl.BackColor = 2366701
MsgBox "الرجاء القيام بملء جميع الحقول المطلوبة"
Me.Undo
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
Exit Sub
End If
End If
Next
Next i
MsgBox "تم حفظ بيانات"