|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Login Problems
I have created a ms access front end to SQL database.
I have used the below vb to create the user login function, but it is not working, i believe that this is because the 'password' field in the sql database is set to the password format, is there some extra code i need to enter to get the login script to work. ** also i am using a different systems user table (so i don';t have to keep it up to date! but users can change their password, this seeem to then be stored in several fields Password, Password#2, password#3 etc. so when i need to authenticate users, i will have to check all these password fields to make sure.... any help would be greatly appreciated... Private Sub cmdLogin_Click() If IsNull(Me.username) Or Me.username = "" Then MsgBox "You must enter a User Name.", vbOKOnly, "Required Data" Me.username.SetFocus Exit Sub End If If IsNull(Me.pword) Or Me.pword = "" Then MsgBox "You must enter a Password.", vbOKOnly, "Required Data" Me.pword.SetFocus Exit Sub End If If Me.pword.Value = DLookup("[Password]", "tblUser", "[PayrollNo]=" & Me.username.Value) Then MyPayrollNo = Me.username.Value DoCmd.Close acForm, "LogOn", acSaveNo DoCmd.OpenForm "Welcome" Else MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!" Me.pword.SetFocus End If 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 thanks |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > Login Problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|