Limit Login Attempts (1 Viewer)

eugz

Registered User.
Local time
Today, 14:23
Joined
Aug 31, 2004
Messages
128
hi All.

I create Login form and would like to limit enter wrong password no more then three times. How do it? I will appreciate for sample.

Thanks.
 

spikepl

Eledittingent Beliped
Local time
Today, 20:23
Joined
Nov 3, 2010
Messages
6,142
A word of advice: don't go crazy with all these common "safety"-features: restrictions on number of attempts, or the outright silly BS about lover/upper-case and numbers mix for passwords.

Access is not suitable to run the finances of a country anyways. Further, Access is mostly ran on a LAN where you vary seldom have access from general public.So think about this twice, before you bless your users with "safety"-features that everyone just curses.
 

yameen2011

Registered User.
Local time
Today, 22:23
Joined
Jan 19, 2013
Messages
59
hi All.

I create Login form and would like to limit enter wrong password no more then three times. How do it? I will appreciate for sample.

Thanks.
Try this code on your login button.
Code:
intLoginAttempts = intLoginAttempts + 1

    If intLoginAttempts > 3 Then
    
   DoCmd.Quit
        MsgBox "You do not have access to this database.  Please contact your system administrator.", vbCritical, "Restricted Access!"
        
    End If
 

eugz

Registered User.
Local time
Today, 14:23
Joined
Aug 31, 2004
Messages
128
Hi yameen. Thanks for replay.

What is intLoginAttempts?

Thanks.
 

yameen2011

Registered User.
Local time
Today, 22:23
Joined
Jan 19, 2013
Messages
59
Hi yameen. Thanks for replay.

What is intLoginAttempts?

Thanks.
sorry for incomplete help.now check this.
Code:
Private intLoginAttempts As Integer
intLoginAttempts = intLoginAttempts + 1

    If intLoginAttempts > 3 Then
    
   DoCmd.Quit
        MsgBox "You do not have access to this database.  Please contact your system administrator.", vbCritical, "Restricted Access!"
        
    End If
    End sub
 

Users who are viewing this thread

Top Bottom