Solved

Password login form

Posted on 2014-10-06
3
188 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 27

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

740 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