Results 1 to 6 of 6
  1. #1
    videoclocknet is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    10

    Setting user level security in Access 2003 - Where do I specify password?

    Hi guys,

    In my Access 2003 database I'm setting user level security.

    I've created those users and assigned permissions. So now when I open that database it requests the username and password.

    I've checked that it works as expected - if I type a wrong username an error is displayed.

    At the moment the password for all users except the Administrator is blank - that is, no password. In fact, if I type some letters in the password, an error is displayed saying that the password is not correct.

    I don't find the option to specify a password for a user in Access 2003. Can you give me a hand?

    Regards

  2. #2
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    First you must open your database 'exclusively' (Open > Open Exclusive).
    Then go Tools > Security > Set Database Password.
    Enter desired password in, and close db.
    When you go back in you should be prompted for the password entry.

  3. #3
    videoclocknet is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    10
    But that is database password. I want to change the users' passwords.

    In fact, if I set the database password and try to log in as Administrator, I have to type both passwords.

    Regards

  4. #4
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    You want a specific password for each user that would potentially access the db?

  5. #5
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    Create a table of usernames & respective passwords (call tblEmployees). Then a form (frmLogon) to enter user & pass and have that load on db load. On the form have a text box (txtEmployee) where they enter user name, and have a text box (txtPassword) to enter password. Have a button (cmdLogin) and put the code below behind the button.
    Have code to cross check user & password entry to the table that contains the data. If it is correct then access granted and it can open up whatever form you need, if not then access denied.
    Code:
    Private Sub cmdLogin_Click()
    
    'make sure a username is entered
    If IsNull(Me.txtEmployee) Then
        MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
        Me.txtEmployee.SetFocus
        Exit Sub
    End If
    
    'make sure a password is entered
    If IsNull(Me.txtPassword) Then
        MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
        Me.txtPassword.SetFocus
        Exit Sub
    End If
    
    'check password in tblEmployees to make sure it matches with username selected
    If Me.txtPassword.Value = DLookup("strEmpPassword" this is table field name, "tblEmployees", "[lngEmpID]=" & Me.txtEmployee.Value) Then
        lngMyEmpID = Me.txtEmployee.Value
    
    'Close logon form and open your form
        DoCmd.Close "frmLogon"
        DoCmd.OpenForm "Your_Form_Name"
        Else
            MsgBox "Password Invalid. Please Try Again.", vbOKOnly, "Invalid Entry"
            Me.txtPassword.SetFocus
        End If
    
    End Sub
    Last edited by nick404; 07-08-2015 at 02:25 PM. Reason: editted code

  6. #6
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    If that doesn't work please let us know!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 07-16-2014, 10:32 AM
  2. Replies: 1
    Last Post: 03-27-2014, 07:34 AM
  3. Replies: 13
    Last Post: 11-18-2013, 02:20 PM
  4. Access user security level
    By tsv_tech in forum Access
    Replies: 2
    Last Post: 07-25-2012, 11:08 PM
  5. user level security and splitting access db
    By tomClark in forum Security
    Replies: 3
    Last Post: 02-06-2010, 04:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums