haiga9109

New Member
mình có 1 form đăng nhập ,với 2 ô textbox tên đăng nhập và pass

mình muốn với tên đăng nhâp và pass này menu sẽ hiện đầy đủ

với tên đăng nhâp và pass word khác nó sẽ ẩn một số phần trong menu

hiện mình có 1 bảng lưu trữ usename và pass


code nút đăng nhập




Private Sub cmdDangNhap_Click()

If IsNull(Me.cboUserID) Or Me.cboUserID = "" Then

msgBoxOK DLookup("[NoiDung1]", "tblThongBao", "[SoTB] = 1"), vbCritical, DLookup("[TieuDe]", "tblThongBao", "[SoTB] = 1")

Me.cboUserID.SetFocus

Exit Sub

End If

If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then

msgBoxOK DLookup("[NoiDung2]", "tblThongBao", "[SoTB] = 1"), vbCritical, DLookup("[TieuDe]", "tblThongBao", "[SoTB] = 1")

Me.txtPassword.SetFocus

Exit Sub

End If

If Me.txtPassword.Value = Me.txtPasstemp Then


USERNAME = Me.txtUserName.Value

USERID = Me.cboUserID.Value

UserLevel = Me.txtUserLevel.Value

UserPASS = Me.txtPassword.Value


DoCmd.Close

DoCmd.OpenForm "main"


Else

msgBoxOK DLookup("[NoiDung1]", "tblThongBao", "[SoTB] = 2"), vbCritical, DLookup("[TieuDe]", "tblThongBao", "[SoTB] = 2")

Me.txtPassword.SetFocus

End If


intLogonAttempts = intLogonAttempts + 1

If intLogonAttempts > 3 Then

msgBoxOK DLookup("[NoiDung2]", "tblThongBao", "[SoTB] = 2"), vbCritical, DLookup("[TieuDe]", "tblThongBao", "[SoTB] = 2")

Application.Quit

End If

End Sub



 
Tạm thời (gian) thì mình không hiểu được bạn hỏi j hết


việc bạn hỏi và chuyện bạn cho đoạn code đăng nhập ở trên có liên quan j nhau ko
 

thuydu1984

New Member
mình mới thêm hình vào

làm sao giờ

---------- Bài thêm lúc 16:45 ---------- Bài trước là lúc 15:39 ----------

không có ai biết à
 

Các chủ đề có liên quan khác

Top