Minh sua duoc roi.
Private Sub DN_Click()
If (Not IsNull(DLookup("[TenDN]", "DangKy", "[TenDN]=[Forms]![DangNhap]![ID]"))) And (Not IsNull(DLookup("[pass]", "DangKy", "[pass]=[forms]![DangNhap]![pas]"))) Then
MsgBox "Chuc mung " & ID & " dang nhap thanh cong", vbOKOnly, "Thanh cong"
If (ID = "Admin") And (PAS = "admin") Then
DoCmd.Close acForm, "DANGNHAP"
DoCmd.OpenForm "F_NQL"
Else
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "F_CHINH"
DoCmd.Close
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
Else
'MsgBox "Ten dang nhap hoac tai khoan khong dung! Hay kiem tra lai!!", vbInformation, "Thong bao"
loi.Visible = True
'ID.SetFocus
'DoCmd.CancelEvent
End If
End Sub