03Explorer
Technical User
I am working on a project that the Access database rights are using the AD credentials to identify them... This part works like a champ! I asked IT to populate the EmployeeID with the IDs I use in my application which are the PK for ADP. This thinking was that I now can match up people to my system and incorporate phantom security/limitations.
The fun now is simply... How can I use the logged in person (NET ID) to see their AD.EmployeeID So I have a match to my tables.
[Code Logged_in_User_Name]
Function UserName()
Dim objSysInfo As Object
Dim objcurrentuser As Object
Set objSysInfo = CreateObject("ADSystemInfo")
Set objcurrentuser = GetObject("LDAP://" & objSysInfo.UserName)
Debug.Print objcurrentuser.givenName
Debug.Print objcurrentuser.LastName
End Function
[/code]
The fun now is simply... How can I use the logged in person (NET ID) to see their AD.EmployeeID So I have a match to my tables.
[Code Logged_in_User_Name]
Function UserName()
Dim objSysInfo As Object
Dim objcurrentuser As Object
Set objSysInfo = CreateObject("ADSystemInfo")
Set objcurrentuser = GetObject("LDAP://" & objSysInfo.UserName)
Debug.Print objcurrentuser.givenName
Debug.Print objcurrentuser.LastName
End Function
[/code]