I'm setting up a login for my database. At this point I have succesfully implimented code to request a user name and password, validate them from a table and then open a switchboard to access the database.
I want to add a second part onto this that forces the database to close after 3 unsuccesful login attempts and displays a message.
This is the code I am using:
The dialog box never shows up and the database never closes no matter how many times I use the wrong credentials to log on.
Thanks for your help!
Bruce
I want to add a second part onto this that forces the database to close after 3 unsuccesful login attempts and displays a message.
This is the code I am using:
Code:
intlogonattempts = intlogonattempts + 1
If intlogonattempts > 3 Then
MsgBox "You do not have access to this database.Please contact admin.", _
vbCritical, "Restricted Access!"
Application.Quit
End If
End Sub
The dialog box never shows up and the database never closes no matter how many times I use the wrong credentials to log on.
Thanks for your help!
Bruce