changkhoonline77 > 21-06-14, 08:31 AM
Private Sub cmdLogin_Click()
Dim varPassword As String
If IsNull(Me.cbtendangnhap) Or Me.cbtendangnhap = "" Then
msgBoxUni DLookup("[LOI]", "tblMsgbox", "[ID] = 32"), vbInformation + vbOKOnly, DLookup("[TITLE]", "tblMsgbox", "[ID] = 32")
Me.cbtendangnhap.SetFocus
Exit Sub
End If
If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then
msgBoxUni DLookup("[LOI]", "tblMsgbox", "[ID] = 7"), vbInformation + vbOKOnly, DLookup("[TITLE]", "tblMsgbox", "[ID] = 7")
Me.txtPassword.SetFocus
Exit Sub
End If
'varPassword = DLookup("matkhau", "tblUser", "ten = '" & Me.cbtendangnhap & "'")
'On Error Resume Next
If Me.txtPassword.Value = DLookup("matkhau", "tblUser", "[ID] = " & Me.cbtendangnhap.Value) Then
ID = Me.cbtendangnhap.Value
'If Me.txtPassword = varPassword Then
GvarUserName = Me.cbtendangnhap
'msgBoxUni DLookup("[LOI]", "tblMsgbox", "[ID] = 33"), vbInformation, DLookup("[TITLE]", "tblMsgbox", "[ID] = 33")
Me.Visible = False
DoCmd.OpenForm "form1"
Else
msgBoxUni DLookup("[LOI]", "tblMsgbox", "[ID] = 6"), vbInformation + vbOKOnly, DLookup("[TITLE]", "tblMsgbox", "[ID] = 6")
solandangnhap = solandangnhap + 1
Me.txtPassword.SetFocus
End If
If solandangnhap > 2 Then
msgBoxUni DLookup("[LOI]", "tblMsgbox", "[ID] = 34"), vbInformation + vbOKOnly, DLookup("[TITLE]", "tblMsgbox", "[ID] = 34")
Application.Quit
End If
'End If
End Sub
If Me.txtPassword.Value = DLookup("matkhau", "tblUser", "[ten] = " & Me.cbtendangnhap.Value) Then
ten = Me.cbtendangnhap.Value
vba > 21-06-14, 10:34 PM
If Me.txtPassword.Value = DLookup("matkhau", "tblUser", "[ten] = " & Me.cbtendangnhap.Value) Then
If Me.txtPassword.Value = DLookup("matkhau", "tblUser", "[ten] = '" & Me.cbtendangnhap.Value) & "'" Then
changkhoonline77 > 21-06-14, 11:17 PM
vba > 22-06-14, 09:50 PM
changkhoonline77 > 23-06-14, 08:03 AM
vba > 23-06-14, 11:10 PM
GvarUserName = Me.cbtendangnhap
GvarUserName = Me.cbtendangnhap.Column(1)
changkhoonline77 > 24-06-14, 08:09 AM
If GetQuyen = "user" Then
DoCmd.OpenForm "frm_system_backup"
Else
msgBoxUni DLookup("[LOI]", "tblMsgbox", "[ID] = 45"), vbInformation + vbOKOnly, DLookup("[TITLE]", "tblMsgbox", "[ID] = 45")
End If
"(DLookup("[DATQUYEN]", "tblphanquyen", "[ID] = 1")"
Minh Tiên > 24-06-14, 08:35 AM
if Getquyen="(DLookup("[DATQUYEN]", "tblphanquyen", "[ID] = 1")" then
if Getquyen=DLookup("[DATQUYEN]", "tblphanquyen", "[ID] = 1") then