Access Login Check Code two

Source: Internet
Author: User

' This section is used to check if you have entered a user name or password
If IsNull (Trim (me.username)) Then
Docmd.beep
MsgBox ("Please enter user name!")
Else
If IsNull (Trim (Me.password)) Then
Docmd.beep
MsgBox ("Please enter your password!")
Else
' The following is used to compare the [landing table]
Me.RecordSource = "SELECT * from login table where user name = '" & Me.username & "' and password = '" & Me.password & "'"
' Set rs = getrs (str)
If Me.Recordset.EOF Then
Docmd.beep
MsgBox ("No this user or password is wrong, please re-enter!")
Me. Username = ""
Me. Password = ""
Me. Username. SetFocus
Exit Sub
Else
DoCmd.Close
' Trial Version usage limit
If n =
DoCmd.Close
Else
n = n + 1
MsgBox ("Welcome to use Chengde County cadre management system!")
Check = True ' Set login flag
DoCmd.OpenForm ("Main Query form")
End If
End If
End If

Access Login Check Code two

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.