Lonnie Johnson
prodevmg at yahoo.com
Tue Mar 21 14:34:25 CST 2006
I am wanting to use Active Directory to update the passwords in a security table I have. Does anyone know how I can get a field list? I can use the code below but it has certain fields. I don't know how to get the password field because I don't know the field name.' Dim oConnection1 As Object Dim oCommand1 As Object Set oConnection1 = CreateObject("ADODB.Connection") Set oCommand1 = CreateObject("ADODB.Command") ' Open the connection. oConnection1.Provider = "ADsDSOObject" ' This is the ADSI OLE-DB provider name oConnection1.Open "Active Directory Provider" ' Create a command object for this connection. Set oCommand1.ActiveConnection = oConnection1 ' Compose a search string. oCommand1.CommandText = "select name, displayname, userprincipalname, mailNickname, telephoneNumber from 'LDAP://kvckc' WHERE objectCategory='Person' AND objectClass='user' AND name='Lonnie Johnson'" ' Execute the query. Set rs = oCommand1.Execute '-------------------------------------- ' Navigate the record set '-------------------------------------- May God bless you beyond your imagination! Lonnie Johnson ProDev, Professional Development of MS Access Databases Visit me at ==> http://www.prodev.us --------------------------------- Relax. Yahoo! Mail virus scanning helps detect nasty viruses!