Password Logic - TechRepublic
General discussion
August 27, 2001 at 05:08 AM
mra2

Password Logic

by mra2 . Updated 24 years, 10 months ago

I have a password form in Access 97. I want to give 3 chances and then go back to the Main Menu. My code (below) works if you enter the correct Password (SPL. It does not work if you enter an incorrect password.

Dim passcount as integer
If me.text21 = “SPL” then
me.text21 = Null
Docmd.openform “Secretary Changes”, acnormal, “”, “”, , acWindow Normal

Else if me.text21 <> “SPL” then
Do until passcount =3
me.text21.setfocus
me.text21 = ” ”
passcount = passcount + 1
Loop
end if
‘go to Main Menu

This discussion is locked

All Comments