X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Active Directory, Access 2016    
post Feb 27 2018, 01:15 PM

Posts: 1
Joined: 27-February 18

Hello everyone.

I've been doing basic things with Access for a while now and, I can usually figure things out for myself (with the help of google and this site) but this one has me stumped.

I have a form with a list of AD Logon names. I am wondering if there are any functions I could use to get the First and Last name to auto populate by getting the data from AD? The screenshot might help:

As you can see, I would like to auto add the first and last name by looking up the AD Login in AD.

Any help at all would be much appreciated.

Thank you

Attached File(s)
Attached File  2018_02_27_12_02_06.jpg ( 24.07K )Number of downloads: 8
Go to the top of the page
post Feb 27 2018, 04:44 PM

Posts: 739
Joined: 4-October 06
From: Maine, US

I found this:
Go to the top of the page
post Feb 27 2018, 06:11 PM

Posts: 1,184
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)

My full name and my logon name are the same so I don't know which this returns...but you can try it.

Sub getfullname()
Dim objindname As Object
Dim objAllNames As Object
On Error Resume Next
Set objAllNames = GetObject("Winmgmts:").instancesof("win32_networkloginprofile")
For Each objindname In objAllNames
MsgBox objindname.FullName
End Sub
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    13th December 2018 - 09:14 AM