# Code2Add

CLine:
Dim SF As Control
With MyUser
   If .GetAbility(Me.NAME, OpenForm) Then
      Me.AllowAdditions = .GetAbility(Me.NAME, Add)
      Me.AllowEdits = .GetAbility(Me.NAME, Edit)
      Me.AllowDeletions = .GetAbility(Me.NAME, Del)
      For Each SF In Me.Controls
        If SF.ControlType = acSubform Then
            SF.Form.AllowAdditions = Me.AllowAdditions
            SF.Form.AllowEdits = Me.AllowEdits
            SF.Form.AllowDeletions = Me.AllowDeletions
        End If
      Next
   Else
      MsgBox "عفواً " & .UserName & "      " & vbCr & vbCr & "ليس لديك الصلاحية لفتح هذا النموذج", 0 + 16 + 1572864, "نظام الصلاحيات"
      Cancel = True
   End If
End With


