Solved

Password login form

Posted on 2014-10-06
3
180 Views
Last Modified: 2014-10-07
I would like to develop a password login form.  I have a table setup with UserName, and Password.  Everyone will have an initial password of "password".  But the first time they log in to the database I want them to have to change their ready-made password.  Then once they've established their new password it will be their password until they change it.  So I also need a way for them to change their password.

One more thing... they should get three attempts to enter the correct password.  If they don't enter their correct password after three attempts I want the database to close.

Has anyone done this before?

--Steve
0
Comment
Question by:SteveL13
3 Comments
 
LVL 26

Accepted Solution

by:
MacroShadow earned 250 total points
ID: 40364657
While it is possible and has been done numerous times, this method isn't very secure. For instance, reading the password from the table.

A quick google search will give you several solutions.

Attached is a sample I found on the net ages ago.
SecurityDemo.zip
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 250 total points
ID: 40364684
...and here is some brute force code to restrict the login attempts to 3

Dim bytCounter As Single

Do Until bytCounter = 3
    If InputBox("Enter Password") <> "Password" Then
        MsgBox "Incorrect Password"
        bytCounter = bytCounter + 1
        If bytCounter = 3 Then
            MsgBox "you failed to login after 3 attempts," & vbCrLf & "...please contact your supervisor"
            Exit Sub
        End If
    Else
        MsgBox "login successful"
        Exit Do
    End If
Loop

Open in new window

0
 

Author Closing Comment

by:SteveL13
ID: 40366597
Thank you to both of you.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now