SunQuest
 
           Database Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesDatabase Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old December 2nd, 2004, 05:41 AM
mezza1 mezza1 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 12 mezza1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 28 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesDatabase Development > Login Problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway