Results 1 to 6 of 6

Thread: Multiusers

  1. #1
    Join Date
    Oct 2005
    Posts
    87

    Unanswered: Multiusers

    Hello, i have a problem. Maybe its not a problem but something doesn't work in my db. I want to create couple users, and let each user to open/run different forms or macros or tables. I set up everything (new workgroup file, new users with their permissions) but when i log in with specific user, i can still open all forms, tables, etc... although checkbox'es are set to prevent this user from doing it...

    What could be wrong?


    Thanx

  2. #2
    Join Date
    Dec 2005
    Location
    Omaha, NE
    Posts
    4
    YZF,
    I am doing something similar but am NOT using the usergroup functions of Access.

    I have code that captures the user logon name. I also have two tables for user "permissions" - whether a user is a Mgr or User. I use an IF-THEN and DLookup statement on a Form open button to compare the user logon name to a particular permission table:

    If User_Name() = DLookup("[User_Name]", "tbl_usersMgr", "User_Name=" "'& User_Name() & "'") then
    <open form>
    Else
    MsgBox "You don't have permission to ....."
    DoCmd.Close
    Exit Sub
    End If

    This works pretty well for me. I have about 23 users on my db so managing user permissions is not too difficult.

    rclocke

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    did you remove all permissioins form the 'Admin' user?
    are you seeing the login screen
    how have you coereced your users to use the workgroup file, ie are you certqain that when they open there copy of your database they are usign the correct workgroup.

    There is a security FAQ on securing Access applications, I think its on the microsoft site - well worth a read.

  4. #4
    Join Date
    Oct 2005
    Posts
    87
    Quote Originally Posted by healdem
    did you remove all permissioins form the 'Admin' user?
    are you seeing the login screen
    how have you coereced your users to use the workgroup file, ie are you certqain that when they open there copy of your database they are usign the correct workgroup.

    There is a security FAQ on securing Access applications, I think its on the microsoft site - well worth a read.
    Something was wrong there, i created fresh workgroup file and now it works...

    And rclocke idea is very interesting....how do you manage to capture logon name?

    Thnx

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    one way:

    Dim wshNetwork As Object
    Dim strLogin as string
    Set wshNetwork = CreateObject("wscript.network")
    strLogin = wshNetwork.UserName
    Set wshNetwork = Nothing

    another way

    izy
    currently using SS 2008R2

  6. #6
    Join Date
    Dec 2005
    Location
    Omaha, NE
    Posts
    4
    Thanx Izy for the samples.

    YZF, I use something very similar to "another way" posted by Izy. I use the UserName() to determine if they can even get into my Access db (I'm on a very large LAN but we limit access to our DB based on my user table) and then I use a Mgr/User table to further restrict access.

    A couple of other uses for the UserName value:
    1. I pass the UserName value to an Unbound text box on my initial dashboard that displays to the user his or her name - minor touch but adds a little personality to the db.
    2. I use this value as a default value for other forms if the users enter data/info and I want to associate that data/info to a particualr user (i.e. tie that data/info to a user in a table). When they open a data entry form, their name is already displayed in a "Submitted by" field.

    Lots of use for this "value".

    Rich (rclocke)

Posting Permissions

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