Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Stephanie53 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    246

    Windows Login....THIS IS ACCESS 2010 and cant not be converted to earlier version


    first off this was posted on another part of Access Forum to which it was suggested if that answer couldnt help then to come here...

    I want that when an employee logs in to their computer and brings up the database that their privilges are already assigned in this DB - by their First Name and Last Name - my question is 2 fold...

    1. their log in usually consists of 2 letters and 4 numbers - i believe i will need to add this to their name in the Employee table/query i have ...correct?

    2. and in doing so will need to put this somewhere in the DB for when they click it that makes it impossible for them to select another user in the DB to be able to have more control.

    i went to http://www.dbforums.com/6332819-post68.html (from the other reply in the other post) and read that but not what i want as i already have the certain privileges set up in this DB - but if i have to change this please let me know and advise on how i could do this..

    TIA

    Stephanie

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    1. Yes.

    2. Users don't even have to be aware they are restricted. I have code that accomplishes this. It grabs the user's network login id and searches the table for record. If not found I know they are a new user and then they are presented with a login form so a new record can be created. I assume any user opening the database is valid user because they passed the network logins. They never see the login form again. Review:
    https://www.accessforums.net/access/...ted-29901.html
    http://forums.aspfree.com/microsoft-...ue-323364.html

    Then I use individual's info to manage their interactions with forms. Buttons are set visible/not visible according to their permissions, initials are automatically saved to records, forms/reports are filtered accordingly.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Stephanie53 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    246
    Hi June07!! Long time no chat :-)

    ok..as for the answers to my questions:

    1. Ok i add a field to the table Employees - i have another table that has them assigned to Priviledges

    2. on this link: https://www.accessforums.net/access/u...ted-29901.html i think i know what your talking about there. But question on this is this... can the employee open the database from where they are login at without a box opening up and having them go thru? (which i doubt this will happen due to the fact they will not be assigned a computer until they have been cleared by our IT dept and it looks like they want me to stay on to keep updating this DB so I will be the second one to know login info and unless they have been approved they dont want auto create new employee) and can it be registered in another table of who, when, where, day and time in behind the scenes sort of way?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Not sure I understand your question.

    My users don't see a login form if they are already in table (the form opens by default when the db opens but it immediately closes if user is in the table, they might see the form 'flash'). I have code set up so they 'self-register' if they are a new user. If you don't want that then don't code for it. When you are notified of a new user and their username, you can enter them into the table. If the new employee doesn't have a computer with the database installed available to them, then what is the issue?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Stephanie53 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    246
    ok now the question is..where do i put this code for when they open up this DB?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    My db has it behind the login form. What is the default form when your db opens?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Stephanie53 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    246
    Home - i need it to register the employee name in the drop down and not be able to have them access to change names there to someone else - do you still have my DB?

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    No, I purged files.

    With my code suggestion there is not any 'dropdown' at all, no combobox needed.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Stephanie53 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    246
    Database551.zip

    June,

    Here is my DB - i am trying to figure out where i would put your code and how it would work with my DB...

    Can you assist me on this?

    Thank You

    Stephanie

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Depends what you want to happen.

    Do you want new users able to self-register? [I do this]

    Do you want to require username/password authentication to work with database? [I don't do this]

    Right now your default open form is a Login that requires username and password. Instead of the combobox, populate a textbox with network USERNAME using Environ() function. Need a field in Users (or Employees, not sure you really need both tables) table for the network USERNAME. So in the form Open event, code like (yes, type USERNAME exactly as shown with quote marks):

    Me.txtUser = Environ("USERNAME")

    Then in the Password AfterUpdate event, code like:

    If DLookup("Password", "Users", "UserName='" & Me.txtUser & "'") = Me.txtPassword Then
    'allow user to continue
    Else
    MsgBox "You are not an authorized user. The database will now close. Contact Administrator"
    Application.Quit
    End If

    Now that the user is in the db, if you want to control privileges on forms such as whether or not buttons are available, will need code behind relevant form Open event that uses the USERNAME to get that user's AccessLevelID and then code to enable/disable controls. If you want to filter records according to the AccessLevelID and/or UserID then one of those values must be in the datasets (tables or queries) so that criteria parameters can be applied.


    Ian Fisher name in Users table has a typo error, there is a space in front of Fisher.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    Stephanie53 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    246
    No i dont need both tables as i was trying 2 different ways - i like to keep Employees as it has more info on it that we need. i will try what you said and let you know. now question..this is for the Windows login..correct? or will with eliminate the Windows login feature?

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Windows login? You mean the network? Suggested code will grab the user's USERNAME from the network but if you want password validation for the database then that has nothing to do with the network password validation. If you want to eliminate the db password then don't use that code and remove the password textbox. Whether or not you use the login form (or something similar) depends on if you want new users to 'self register', in other words code will grab their USERNAME and add them to the Employees table then open a form for them to fill in all the other employee info with a default setting for their AccessLevel. This is the approach I use. What do you want?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    Stephanie53 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    246
    yes that is exactly what i want ...now question before we go further..the privileges that i have set up since there is a lot on this DB that certian departments can go into (see Privileges in DB and you can see what i mean) can i go back in and set those up as AccessLevels?

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I don't know what the privileges mean and I have no idea how you want to limit user interaction.

    Does HR Manager have any reason to use this db?

    Should Sales staff be able to view Purchases and Inventory?

    Are customers assigned to specific sales staff and employee should only view 'their' customers?

    Should some people not be able to enter/edit data and only allowed to print reports?

    The only user limitation in my db is 2 buttons are not available to staff, only administrator sees those. Every user is categorized as staff, manager, or administrator and there is only one administrator identified in the Users table.

    BTW, Employee table does not show department employee works in and why is there company info (inconsistent names) in the table - don't they all work for same company?
    Last edited by June7; 06-04-2013 at 11:12 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    Stephanie53 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    246
    Here are the answers in accordance of questions:

    1. yes the HR Manager will be managing the employees - the managers will be able to access their departments and add notes on the employees like evaluations, sick days, etc etc. this is why the HR Manager will be having this access
    2. no the sales staff will not be able to do any type purchasing power so no to the purchasing. they are allowed to view but not edit inventory
    3. no all sales will be allowed to see all customers due to the fact that if one of the sales people is out sick or on another call they will be able add/remove items before it goes into production. but with their login it will register to who made the changes and what changes were made
    4. each department should be allowed to leave notes or what ever they may need to do regarding their department (i.e. shipping can change ship to address or shipping company, production can add any comments to the producing of product, quality control can add their notes on the quaility inspection of the product, sales add any other info to help the rest with the production of the product. each department will have their own reports that they will need to have access to and be able to print them up. i will add departments to the employee list
    5. this company is huge believe it or not...it spans in 5 buidings where i am at and 3 buildings 2 streets over..but i will change it to the main address to where the main office is.

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

Similar Threads

  1. Using Windows Login..
    By Stephanie53 in forum Access
    Replies: 5
    Last Post: 05-30-2013, 12:29 PM
  2. Replies: 2
    Last Post: 03-07-2013, 06:35 PM
  3. Detect which version of Windows is running
    By GraeagleBill in forum Programming
    Replies: 2
    Last Post: 12-31-2012, 05:07 PM
  4. Replies: 5
    Last Post: 10-28-2011, 12:12 PM
  5. Access 2010 / Windows 7 conflicts?
    By SteveF in forum Access
    Replies: 2
    Last Post: 07-22-2011, 03:37 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