Results 1 to 2 of 2
  1. #1
    tmoensted is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    1

    Active Directory Authentication Code

    Hi


    This code in https://www.accessforums.net/securit...ess-33164.html looks really useful to me. Would it be possible for you to tell me how to implement this, so that the validation is performed on database startup (presumably via AutoExec) - and perhaps how i might log a users actions with username based on the login id.
    Any help in that direction would be greatly appreciated!

    Best regards
    Theis


    Mod edit: edit post and split to new thread.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    That code is a function that will return either True or False. Call function from macro or VBA or in a query or in a textbox. I would guess that poster of that code used a button click event to call the function, maybe:

    If AuthenticateAD(Me.tbxUser, Me.tbxPassword) = True Then
    'do this
    Else
    'do this
    End If

    Could add code that saves the username somewhere so it will always be accessible for reference. This could be a global variable or a textbox on a form that never closes (such as Main Menu) . I do the latter.
    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. Combo box to pull from active directory
    By JackieEVSC in forum Forms
    Replies: 2
    Last Post: 12-06-2011, 08:39 AM
  2. MS Active Directory
    By pkelly in forum Access
    Replies: 9
    Last Post: 10-21-2011, 08:26 AM
  3. access+Active directory
    By cpcp in forum Access
    Replies: 6
    Last Post: 11-15-2010, 02:30 AM
  4. Active Directory coding
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-28-2010, 08:33 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