See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.
Option Compare Database Const NumLoginAttempts = 3 Dim Attempts As Integer Private Sub Cbousername_AfterUpdate() 'If a username is selected, then place the focus on the password field. If Not IsNull(Me.Cbousername) Then Me.txtPwd.SetFocus Me.CmdLogin.Enabled = True End If End Sub Private Sub CmdLogin_Click() 'Check to make sure that there are characters in the txtpwd field 'If not, display message telling user that a password must be entered and place focus back on the password box If IsNull(Me.txtPwd) Then MsgBox "You must enter a password.", vbExclamation + vbOnly, "Required Entry" Me.txtPwd.SetFocus End If 'Validate password for user If Me.txtPwd.Value = DLookup("Password", "Users", "[ID]=" & Me.Cbousername.Value) Then ID = Me.Cbousername.Value 'Close the login form and open frmMain DoCmd.Close acForm, "FrmLogin", acSaveNo DoCmd.OpenForm "frmMain" End If If Me.txtPwd.Value <> DLookup("Password", "Users", "[ID]=" & Me.Cbousername.Value) Then MsgBox "The password you entered does not match the username selected.", vbExclamation + vbOnly, "Try Again" Me.txtPwd = "" Me.txtPwd.SetFocus Attempts = Attempts + 1 'After 3 tries, the db will close If Attempts > 3 Then MsgBox "Maximum number of attempts reached. Please contact administrator to reset your password.", vbExclamation + vbOKOnly, "Database Shutdown" DoCmd.CloseDatabase Exit Sub Else 'Compare txtpwd field value to the assignedpassword value for the user that is logging in 'If the password that the user types in matches the assignedpassword in tblusers, then have the user create a new password If Me.txtPwd.Value = DLookup("AssignedPassword", "Users", "[ID]=" & Me.Cbousername & " Or [Password] Is null") Then MsgBox "You must enter a new password.", vbExclamation + vbOKOnly, "Invalid Password" Me.LblPwd.Visible = False Me.txtPwd.Visible = False Me.LblNewPwd.Visible = True Me.TxtNewPwd.Visible = True Me.TxtNewPwd.SetFocus End If End If End If End Sub
|Access printing shortcut in Ms Access||10||36|
|Best way to export and then import DHCP to a new server?||6||32|
|How count records in each month from current month going back 12 months||4||28|
|how to direct IT to set up virtual machines on Windows Server 2012R2 for thin clients to run Microsoft Access application?||11||61|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
15 Experts available now in Live!