hassan mohamed 2000 قام بنشر مارس 10, 2017 قام بنشر مارس 10, 2017 السلام عليكم ورحمة الله وبركاته انا عندى قاعدة بيانات فيها نموذج دخول وبعد دخول المستخدم بكلمة السر الخاصه به هيفتح صفحة تسجيل البيانات اريد ان اعطى لكل مستخدم صلاحية محدده عندى جدول اسمه "tblUsers" مكوناته tblUsers uUserID uFirstName uLastName uPassword uSecurityID 1 reception *** 1 2 View Only *** 8 3 ADMIN *** 9 4 System Administrator *** 13 6 security *** 1 واستعلام اسمه "qryUsers" ومكوناته qryUsers uUserID uFirstName FullName uPassword 1 reception reception *** 2 View Only View Only *** 3 ADMIN ADMIN *** 4 System Administrator System Administrator *** 6 security security *** من فضلكم محتاج كود للنموذج فى event on open بحيث uSecurityID 1 يقدر يسجل بيانات فقط uSecurityID 13 يقدر يعدل بيانات فقط uSecurityID 9 يقدر يسجل ويعدل ويحذف البيانات uSecurityID 8 لا يسجل ولا يضيف ولا يعدل يشاهد فقط ان لقيت كود زى ده Private Sub Form_Open(Cancel As Integer) On Error GoTo Err_Form_Open If intuSecurityID = 1 Then Me.Form.AllowAdditions = True Me.Form.AllowDeletions = True Me.Form.AllowEdits = True ElseIf intUserID = 2 Then Me.Form.AllowAdditions = True Me.Form.AllowDeletions = True Me.Form.AllowEdits = False ElseIf intUserID = 3 Then Me.Form.AllowAdditions = True Me.Form.AllowDeletions = False Me.Form.AllowEdits = False ElseIf intUserID = 4 Then Me.Form.AllowAdditions = False Me.Form.AllowDeletions = True Me.Form.AllowEdits = False ElseIf intUserID = 5 Then Me.Form.AllowAdditions = False Me.Form.AllowDeletions = False Me.Form.AllowEdits = True Else Me.Form.AllowAdditions = False Me.Form.AllowDeletions = False Me.Form.AllowEdits = False End If Exit_Form_Open: Exit Sub Err_Form_Open: MsgBox Err.Number & " - " & Err.Description Resume Exit_Form_Open End Sub بس مش عارف اطبقه ازاى وشكرا مقدما
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.