Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Jonk7273 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2015
    Posts
    8

    I'm trying to create multi user logins in Access

    I am trying to create multi-user logins in access 2010. each user will have there own login ID and password. when they login in there name and employee ID will be shown on the form I created so that they will not have to choose there name and ID again. cannot seem to get it to work...is there any simple way of doing this...does anyone have any code to help me out?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  4. #4
    Jonk7273 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2015
    Posts
    8
    That helps, however I need the employees name and employee ID to be shown in the text boxes of the form once they log in...any way I can do that...by the way thank you so much for the fast response it is helping

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Google is your friend! 8^)
    Thanks!

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I have a hidden form that loads before any other form and is used for housekeeping. If this form were running the LogIn then it could hold the values you need on your forms and is easily referenced by any running form.

  7. #7
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    If you don't have a user table, you should. As you progress, you will find more and more reasons for accessing it. Here's most of the field names for one I use:
    LoginID Perm Fname Lname Level Active LoggedIn SndReqEmail SndRgaEmail ContCntr Email

    The loginId is the computer loginId (Google fosUserName). I get that value and query tblUser. If they're not there or they're inactive, they don't get in - no password needed, or will be forgotten, or needs to be renewed. Level allows some functionality and not other. LoggedIn lets me know who's in. Fields 8 and 9 determine if they get certain emails when required. Last field is the email address. If you think this table could prove useful down the road, better to start now.
    RuralGuy's suggestion to hold any of these values would work and is probably the easiest. If you progress enough, you can create a custom user object and assign all the user properties to it on startup. This is what I do and if I want to put their name in a textbox, I'd write Me.ctlMyControl = dbUser.Fname

  8. #8
    Jonk7273 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2015
    Posts
    8

    Thank you very much

    Quote Originally Posted by Micron View Post
    If you don't have a user table, you should. As you progress, you will find more and more reasons for accessing it. Here's most of the field names for one I use:
    LoginID Perm Fname Lname Level Active LoggedIn SndReqEmail SndRgaEmail ContCntr Email

    The loginId is the computer loginId (Google fosUserName). I get that value and query tblUser. If they're not there or they're inactive, they don't get in - no password needed, or will be forgotten, or needs to be renewed. Level allows some functionality and not other. LoggedIn lets me know who's in. Fields 8 and 9 determine if they get certain emails when required. Last field is the email address. If you think this table could prove useful down the road, better to start now.
    RuralGuy's suggestion to hold any of these values would work and is probably the easiest. If you progress enough, you can create a custom user object and assign all the user properties to it on startup. This is what I do and if I want to put their name in a textbox, I'd write Me.ctlMyControl = dbUser.Fname


    Thank you very much this is very helpful!! However do you know where there are any how to videos on how to do what you just explained to me? Please forgive me...I am a novice at best and I really do appreciate your help.

  9. #9
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 8 Access 2013
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by Micron View Post
    If you don't have a user table, you should. As you progress, you will find more and more reasons for accessing it. Here's most of the field names for one I use:
    LoginID Perm Fname Lname Level Active LoggedIn SndReqEmail SndRgaEmail ContCntr Email
    Micron,
    Curious why you are are suggesting duplicating the data that is already in the employee table (hint: OP mentions employee ID in first post). Why not follow the rules of normalization?

    IMHO, Security must be a deeply integrated part of the initial design. To be secure it really needs Built into the foundation of the application. Just like the JET User Level Security was always used. There was no way to turn it off.

    It has been my experience that security is often added as an afterthought. It is bolted on from an existing generic example that has its own user table.

    @onk7273, I would recommend that you use your employee table. Avoid creating a new table that has many of the same fields.

  10. #10
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Boyd, you would be correct except that I'd say I'm not doing that. Jonk7273 said what he/she was trying to do, not stating what he already had so I took it that there are no such tables yet. If there is already a table of employees, I still might not agree. If it's a large company with many employees and his employee table has hundreds of records but only 10 are going to use this db, I'd still have a table of users. Otherwise there would be hundreds of records with empty fields for those who are not users of the db, or don't have passwords assigned. On the security side, the password or login validation methods provide the same level of security, which is low. If password is good enough for poster, validation is too - unless he decides to take another route after your valid point. Based on his proclaimed lack of experience, I doubt he is creating any mission critical applications at this point, and we all have to start somewhere...

    Thank you very much this is very helpful!! However do you know where there are any how to videos on how to do what you just explained to me? Please forgive me...I am a novice at best and I really do appreciate your help.
    Sorry, I know of no such videos. After you consider Boyd's and my comments about security, let me know if you want me to put something together.

  11. #11
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 8 Access 2013
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by Micron View Post
    Otherwise there would be hundreds of records with empty fields for those who are not users of the db, or don't have passwords assigned.
    I have not had that issue. If it did happen, that would indicate data was not properly normalized. into a related table. This is one of the few times a 1:1 relationship between tables can be useful.

  12. #12
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    You're saying if there are 100 employees and 10 users you would give every one of them a password? I must not be understanding you. Sorry.

  13. #13
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 8 Access 2013
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by Micron View Post
    You're saying if there are 100 employees and 10 users you would give every one of them a password? I must not be understanding you. Sorry.
    Yes. An alternative is to have the user info is in a related table with a 1:1 or 1:Many relationship between tables.

    The key is that the user is linked to the employee to eliminate any duplication of data.

    Question:
    Have you ever seen a database that has data in every field in ever record in all table?

    Even is you have 500 employees with only 25 that are using and the user id and password field in the same table it would have minimal, if even detectable, impact due to data compression. I find the duplication of the 25 user's information into a user table generally has a larger impact on the database than the two extra fields added to the existing table.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    And remember, there is no penalty for empty fields. Access does not allocate fields to the table unless you have data for the field.

  15. #15
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Yes. An alternative is to have the user info is in a related table with a 1:1 or 1:Many relationship between tables.
    I think I called that tblUser in the beginning, which you didn't seem to care for.
    The key is that the user is linked to the employee to eliminate any duplication of data.
    Not vital. Where I last worked, the employee table record count was about 45,000 (no, no typo there) and was not editable by anyone outside of personnel. My applications worked just fine without worrying about any duplication.
    Question:
    Have you ever seen a database that has data in every field in ever record in all table?
    No, some had more holes than data.

    I think that your paradigm and mine are quite different from a business environment point of view, but both are relevant. What you have needed to do in your world is not always applicable everywhere, so a little flexibility may be in order. I also respectfully suggest we drop this lest we hijack this thread by debating an issue that doesn't help the OP.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 06-30-2014, 05:46 AM
  2. How to create multi-user database
    By arius in forum Access
    Replies: 1
    Last Post: 04-12-2013, 12:44 PM
  3. Can Access become a multi-user database?
    By DPCarusone in forum Access
    Replies: 3
    Last Post: 02-10-2012, 12:26 PM
  4. Replies: 3
    Last Post: 09-22-2011, 03:35 PM
  5. Multi-User Access
    By alyon in forum Access
    Replies: 4
    Last Post: 07-13-2011, 11:02 AM

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