Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    Hemel and/or Luton, UK, Hertfordshire, England
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Password Problem

    ***Warning*** Self-taught Access newbie (with basic XL VBA skills) posing this question...

    I have created a simple database (in Access XP), with a couple of table with simple relationships, a form and a report. It is all very straightforward and works!

    My users want to have the system password protected so that only a couple of the can add/modify data and the rest can only view. I have created a table called Users and assigned them all a code and password, but how do I code a form to take the users name and check the password?

    I have created a little login form with a combobox for the names coming from the table, and a textbox to take the password they enter. I think I need (excuse the poor pseudocode)

    correctpw = password of person selected in combobox
    If form.textbox.value = correctpw
    then dataform.show
    else msgbox("wrong password")

    or something.

    Thanks for your help.

  2. #2
    Lounger
    Join Date
    Apr 2002
    Location
    Missouri
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password Problem

    Jon,
    If you are working off of a network, then just change the security/sharing properties or the database to only allow certain personnel to have edit/update permissions. Give all others "Read Only" permissions. Then you don't have to worry about editing your database forms etc... Just find the database using windows explorer (or what ever your using) and then right click on it, go to properties and then the security Tab. Should be self explainitory from there, but if you need more just ask.

    That is how we did it in our unit and it works just fine, No passwords needed. The only draw back is if you have a fast or large turn over in your office, then you need to go in and update permissions. If you don't have a lot of people who need edit or update capability then it's really easy.

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password Problem

    Hi Jon,
    Access has some built-in security features that should meet your needs. To get started with this process, you may want to read about security in the Access Helpfiles or in any Access resource book you can get your hands on.

    I found the process a little tricky and cumbersome at first, but there is a Security Wizard (Tools | Security) that simplifies the process a little.

    Please post back if you need further assistance. Good luck! <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

    P.S. Nice userpic! <img src=/S/rofl.gif border=0 alt=rofl width=15 height=15>

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Password Problem

    I have built this kind of login system, but I don't recommend it, especially if you're new to Access coding. It isn't nearly as simply as your pseudocode assumes and it is NOT secure since the logins and passwords live in a table that can be opened by anyone who knows how to bypass the startup routine. You'd be much better off using Access security, but be sure to read the white paper at least twice first.
    Charlotte

  5. #5
    Star Lounger
    Join Date
    Jan 2001
    Location
    Hemel and/or Luton, UK, Hertfordshire, England
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password Problem

    Many thanks to you all for your help. I took MarkJ's advice, and looked at the help and the Wizard. It all seems to have worked ok and I now have a secure database. I will launch it into the big wide world and see how long it takes for my users to break it!

    P.S. Mark - My picture was taken the day after my twin daughters were born. I was very tired!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •