Results 1 to 7 of 7
  1. #1
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75

    Smile Login form with nt login

    Hi Guys,



    Can someone help me creating a form that can take the username and password directly from the Windows NT login and password.

    THanks and Regards,
    hitesh_asrani_j

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    This will grab user name from network: Environ("UserName") - yes, type it exactly as shown. Check this http://www.go4expert.com/forums/showthread.php?t=208

    Why would you need password? I have doubts you can get it.
    Last edited by June7; 09-21-2011 at 05:38 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.

  3. #3
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    You would not be able to get the user password. There are myriad reasons for that, but essentially the main one being that it would not be secure if anyone could just get that information.

  4. #4
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    I am actually creating this for the team and it would be great if the teammate can only view there records and not others.. any help in this

  5. #5
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Quote Originally Posted by hitesh_asrani_j View Post
    I am actually creating this for the team and it would be great if the teammate can only view there records and not others.. any help in this
    You don't need their password for this. You could actually set it so that the logged in name can see their stuff only just by using the network login (as long as you are capturing that and including that in your tables). Then if a user is logged into a workstation, regardless of where they are, they can see only their stuff. But if you want an additional password for them to enter and not just based on the Windows login, then you would need to create that yourself and have a table store it (which isn't all that secure, but I've used some functions to encrypt and decrypt when needed).

  6. #6
    hitesh_asrani_j is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    75
    Yes,, Ok you can help me with that... It is ok if they just see what their name,.... and also one person who can see al

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    The records would need a field that stores the user ID or a foreign key that links to the UsersInfo table. Access will not recognize Environ function so can't use directly in queries or controls. Use VBA Open event of a form that opens on default when project opens (Main Menu) and remains open to populate a textbox with this username or whatever ID value in the UserInfo table is the link for the other table. Then refer to this textbox as paramater input in queries. Or write a public function with the Environ code that can be called whenever wanted.
    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.

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

Similar Threads

  1. Login to a form?
    By tandkb in forum Forms
    Replies: 0
    Last Post: 04-25-2011, 06:05 PM
  2. Login Form Code
    By paddon in forum Programming
    Replies: 4
    Last Post: 04-08-2011, 06:48 PM
  3. Login form plus filter
    By bjelinski in forum Forms
    Replies: 1
    Last Post: 11-29-2010, 04:34 AM
  4. Login Form
    By Kookai in forum Access
    Replies: 3
    Last Post: 10-18-2010, 04:23 PM
  5. Login form register
    By isnpms in forum Security
    Replies: 1
    Last Post: 08-01-2010, 10:30 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