Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2013

    Unanswered: Retrieve Active Directory Groups and associated Users in MS Access 2007

    Dear all,

    As a beginner with Access, I have spent a lot of time searching this issue but cannot find an answer that works... So I am hoping that by posting my request, your great minds will definitely help me out...!!!!

    I browsed a lot on "how to display Active Directory information in MS Access". Unfortunately, with each helping URL pointing to the other. I'm totally ended-up with NOTHING that works for the past 3 weeks.

    Tech GURUS, kindly shower some mercy and help me please...

    Access Database attached

    Table “Unique_ADgroup” contains the specific ADGroups I need to lookup from the Active directory

    Extract “cn” (which holds the AD group name) and “member” (contains the UserIDs) from the Active Directory.

    Note: Data in Table “Unique_ADgroup” will be the input for “cn” in AD

    Expected Functionality:
    • In the attached DB’s form “MainForm”, click button “Create Table for Exporting on ADGroup Names”
    • The VBA script should fetch the “cn”, “member” info from the AD for the specific ADgroups

    Before experimenting the results in Access, I used a tool called JXplorer to check if the ADgroup is displaying the users associated to the group. The screenshot displays the results.

    Progress till now on VBA:
    • Post googling, I referred a bunch of VBA codes which had a closest match to my requirement.
    • In Access when I clicked the button, the system displays the following error:

    Surprisingly, the system is not prompting the UserName and Password to log into the AD.

    I just hope not to have missed some parameters.

    Someone Please please review the code in the attached DB and kindly help me.

    This is a deliverable, I need to complete before end of tomorrow and demo it to the client by evening.

    Thanks a bunch in advance.

    Many thanks,
    Attached Thumbnails Attached Thumbnails AD snapshot.jpg   Error-1.jpg   Error-2.jpg  
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    Not sure that it is the only problem, but I would try:
    objCommand.CommandText = _
        "SELECT cn, member, memberOf" _
            & " FROM 'LDAP://DC=com' WHERE " _
                & "objectCategory='DC=na'"
    Have a nice day!

Posting Permissions

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