اذهب الي المحتوي
أوفيسنا

عدم فتح النموذج بعد تسجيل الدخول


Anasalsalam

الردود الموصى بها

عدم فتم النموذج بعد تسجيل الخول

ارجو من الاساتذة الكرام مساعدتي في حل هذه المشكلة

وهذا رابط البرنامج

https://drive.google.com/file/d/1qPrRSjmorG8It_4g7N0zdE1vBItIbsdT/view?usp=sharing

برنامج فيش

user admin

pss admin

تم تعديل بواسطه Anasalsalam
رابط هذا التعليق
شارك

تفضل

Option Compare Database
Dim trycount As Integer


Private Sub Cansel_Click()
On Error GoTo Handle_Error
  
  [Forms]![frm-UserLogon].Visible = False
  If MyUser.Valid Then
    DoCmd.close
  ElseIf MsgBox("هل ترغب بمغادرة البرنامج؟", 4 + 32, "تأكيد الخروج") = 6 Then
    DoCmd.Quit
  Else
    [Forms]![frm-UserLogon].Visible = True
  End If


Exit_Process:
  Exit Sub

Handle_Error:
  MsgBox Err.Number & vbCrLf & Err.Description
  Resume Exit_Process
End Sub

Private Sub Form_Load()
   trycount = 0
End Sub

Private Sub LoginBT_Click()
On Error Resume Next
Dim LogUser As New CUser
    If trycount > 3 Then
        MsgBox " من حُسن إسلام المرء تركه ما لا يعنيه ", vbOKOnly + vbMsgBoxRight + vbInformation, "تحذير !"
        MsgBox " سيتم إغلاق البرنامج الآن ،،، يرجى مراجعة المبرمج ", vbOKOnly + vbMsgBoxRight + vbInformation, "تحذير !"
        DoCmd.Quit
    ElseIf IsNull(Me.user) Then
        MsgBox (" فضلاً يجب أن تقوم بإدخال اسم المستخدم ")
        Me.user.SetFocus
    ElseIf IsNull(Me.pass) Then
        MsgBox (" فضلاً يجب أن تقوم بإدخال كلمة السر ")
        Me.pass.SetFocus
    ElseIf Len(Trim(Me.pass)) > 20 Then
        MsgBox (" يجب ألا تتجاوز كلمة السر عشرين حرف أو رقم")
        Me.pass.SetFocus
'-------     اسير الشروق        ------            مستخدم مخفى للدخول لنموذج تفعيل والغاء الشيفت واخفاء واظهار الجداول       ---------
            ElseIf [user] = "admin" And [pass] = "2015" Then
            DoCmd.close
            DoCmd.OpenForm "MSysEdit"
            ElseIf [user] = "superadmin" And [pass] = "2015" Then
            DoCmd.close
            DoCmd.OpenForm "Users Ability", acNormal
'-------     اسير الشروق        ------            مستخدم مخفى للدخول لنموذج تفعيل والغاء الشيفت واخفاء واظهار الجداول       ---------
Else
        LogUser.UserName = Me.user
        LogUser.pass = Me.pass
        DoCmd.OpenForm "data"
        If LogUser.Valid Then
            Set MyUser = LogUser
            DoCmd.close acForm, "frm-userlogon"
        Else
            MsgBox " اسم المستخدم أو كلمة السر غير صحيحة ،،، يرجى إعادة المحاولة ", vbOKOnly + vbMsgBoxRight + vbInformation, "تحذير !"
            trycount = trycount + 1
        End If
    End If
End Sub

Private Sub Permissions_Click()
On Error Resume Next
Dim LogUser As New CUser
    If trycount > 3 Then
        MsgBox " من حُسن إسلام المرء تركه ما لا يعنيه ", vbOKOnly + vbMsgBoxRight + vbInformation, "تحذير !"
        MsgBox " سيتم إغلاق البرنامج الآن ،،، يرجى مراجعة المبرمج ", vbOKOnly + vbMsgBoxRight + vbInformation, "تحذير !"
        DoCmd.Quit
    ElseIf IsNull(Me.user) Then
        MsgBox (" فضلاً يجب أن تقوم بإدخال اسم المستخدم ")
        Me.user.SetFocus
    ElseIf IsNull(Me.pass) Then
        MsgBox (" فضلاً يجب أن تقوم بإدخال كلمة السر ")
        Me.pass.SetFocus
    ElseIf Len(Trim(Me.pass)) > 20 Then
        MsgBox (" يجب ألا تتجاوز كلمة السر عشرين حرف أو رقم")
        Me.pass.SetFocus
    Else
        LogUser.UserName = Me.user
        LogUser.pass = Me.pass
        If LogUser.Valid Then
            Set MyUser = LogUser
            DoCmd.OpenForm "Users Ability", , , , , acDialog
            Me.user = Null
            Me.pass = Null
            LogUser = Null
        Else
            MsgBox " اسم المستخدم أو كلمة السر غير صحيحة ،،، يرجى إعادة المحاولة ", vbOKOnly + vbMsgBoxRight + vbInformation, "تحذير !"
            trycount = trycount + 1
        End If
    End If
End Sub




Private Sub user_Exit(Cancel As Integer)
'استخراج رقم اليوزرد
'UN = (DLookup("[SN]", "Users", " deCode([UName],'User')= user "))

End Sub

Private Sub ChangePassword_Click()
    Dim LogUser As New CUser
    If trycount > 3 Then
        MsgBox " Of a good Muslim, one left which does not concern ", vbOKOnly + vbMsgBoxRight + vbInformation, "Caution !"
        MsgBox " The program will be closing now ،،، Please check with the programmer - Mohamed Essam ", vbOKOnly + vbMsgBoxRight + vbInformation, "Caution !"
        DoCmd.Quit
    ElseIf IsNull(Me.user) Then
        MsgBox (" You must enter a user name ")
        Me.user.SetFocus
    ElseIf IsNull(Me.pass) Then
        MsgBox (" You must enter the password ")
        Me.pass.SetFocus
    ElseIf Len(Trim(Me.pass)) > 20 Then
        MsgBox (" Shall not exceed twenty password letter or number")
        Me.pass.SetFocus
    Else
        LogUser.UserName = Me.user
        LogUser.pass = Me.pass
        If LogUser.Valid Then
            Set MyUser = LogUser
             DoCmd.OpenForm "Change password", acNormal
        Else
            MsgBox " Username or password is incorrect ،،، Please try again ", vbOKOnly + vbMsgBoxRight + vbInformation, "Caution !"
            trycount = trycount + 1
        End If
    End If
End Sub

قم باستبدال كل الكود بداخل نموذج الدخول بهذا لاننى لم استطع ارفاقها بسبب كبر المساحة وبطي الانترنت لدى .

 

واذا امكن نبذه عن مشروعك والبصمة .

  • Like 1
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information