Login Form Time & ReSet Count Issue

burrina

Registered User.
Local time
Yesterday, 21:51
Joined
May 10, 2014
Messages
972
I have a login form that closes automatically after a specified time if you do not login with user name and password. It also keeps track of how many times you login and whatever value you set for a password reset it forces you to change when that value is met.

Problem: If you do not login within the allotted time even though a password change has been scheduled, my code resets the login count back to 0.

This is what i want to get around if I can.
Either I have to pause the timer or stop the reset.

After you enter the password is when the login count is fired.
And also when it checks if a new password is required.

Any Ideas?


Thanks,
 
You need to post the entire block(s) of code so we can get a better idea of whats happening...
 
Both of these pieces of code fire in the AfterUpdateEvent of the Users Password textbox.

'Require a Password Change After Set Number of Logins.

If Me.txtlogincnt > Me.txtlogincntno Then
Call MsgBox("A Scheduled Password Change is in Effect. Please Enter a New Password.", vbExclamation, Application.Name)
Me.cmdChngPW.SetFocus
Me.cmdLogIn.Enabled = False

DoCmd.SetWarnings False 'For Current User ONLY!
DoCmd.OpenQuery "qryReSetLoginCount"
DoCmd.SetWarnings True
End If


'Get Login Count & Required Count Before Password Change. Check Active Status.
Me.txtlogincnt = DLookup("[LoginCnt]", "tblUserSecurity_Sec", "[userID]='" & Me.txtUserID.Value & "'")
Me.txtlogincntno = DLookup("[SetLoginCnt]", "tblUserSecurity_Sec", "[userID]='" & Me.txtUserID.Value & "'")

NOT SURE If this is the Best Approach but I tried this.
Which pauses the timer.
Me.TimerInterval = 0
 
Last edited:

Users who are viewing this thread

Back
Top Bottom