Article View: comp.databases.ms-access
Article #48Password scripts
From: Philip P. Dixon
Date: Thu, 02 Oct 1997 00:00
Date: Thu, 02 Oct 1997 00:00
48 lines
2174 bytes
2174 bytes
I am having trouble with a form which accepts a password, verifies it,
and passes along further routines if accepted or closes the form if
rejected 3 times. The code works fine "After Update" of the control
[Password] on the password entry form. The problem comes in when I use
the MS-Access input mask on the control. Once the mask is applied, the
asterisks don't appear the FIRST time a password is entered and even the
CORRECT password fails. Upon the second attempt, all is well! Any
ideas? If I don't use the mask, the password is typed in the window!
The code follows, although I don't think it's a problem.
<<excerpt>>
Private Sub Password_AfterUpdate()
Static Tries As Integer
Tries = Tries + 1
If [Password] = "<password entered here>" Then
[Password] = "Correct!"
Maintenance
DoCmd.Close acForm, "Password Entry"
GoTo Password_AfterUpdate_Quit
Else
[Password] = ""
If Tries > 3 Then
DoCmd.Close acForm, "Password Entry"
GoTo Password_AfterUpdate_Quit
End If
End If
End Sub
<<end excerpt>>
Thanks in advance,
Phil
*************************************************************************
Philip P. Dixon Phone: +1 919-962-1120
Technical Support Manager Fax: +1 919-962-4450
Acquisitions Department Email: phil_dixon@unc.edu
Davis Library 080,CB#3902 acq_dept@email.unc.edu
University of North Carolina URL: http://www.lib.unc.edu/acq/
at Chapel Hill
Chapel Hill, North Carolina 27514-8890, USA
*************************************************************************
Technical Details
Message-ID:
<34334F43.FEF1DD2F@email.unc.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff0ac,e0654fb656d5545b,start X-Google-Attributes: gidff0ac,public X-Google-Thread: 1668c5,e0654fb656d5545b,start X-Google-Attributes: gid1668c5,public From: "Philip P. Dixon" <pdixon@email.unc.edu> Subject: Password scripts Date: 1997/10/02 Message-ID: <34334F43.FEF1DD2F@email.unc.edu> X-Deja-AN: 277473159 X-Priority: 3 (Normal) Organization: The University of North Carolina at Chapel Hill Newsgroups: comp.databases.ms-access,at.fido.msaccess