u dont need to make this kind of buttons for password
for security issues, u ll have to create users groups and assign for each one his authorities, later u ll will be asked automatically for a password everytime u ll log in to the application...
for more info:
www.msdn.com
2007-03-19 20:41:38
·
answer #1
·
answered by abd 5
·
0⤊
0⤋
First you need to create a seprate form for the password
Here the code for that form:
Private Sub Command31_Click()
s = "[usr_log] = '" & Me.usr_log & "'"
x = DLookup("[usr_pwd]", "users", s)
If x = Me.usr_pwd Then
up = x
usrl = Me.usr_log
s = "[usr_log] = '" & Me.usr_log & "'"
x = DLookup("[user_name]", "users", s)
usrfname = x
x = DLookup("[user_p]", "users", s)
usrpp = x
DoCmd.OpenForm "Main"
DoCmd.Close acForm, "F1"
DoCmd.OpenForm "Main"
DoCmd.Close
DoCmd.OpenForm "Main"
Else
x = MsgBox("Password Incorrect", vbExclamation, Me.Caption)
Me.usr_pwd = Null
End If
End Sub
2007-03-20 03:58:25
·
answer #2
·
answered by medical_connection 2
·
0⤊
0⤋