Good afternoon folks
I am querying the activedirectory with VBA to populate a combobox successfully with a list of names.
I get the names fine with rs.fields(“name”)
I can return telephone numbers with rs.fields(“telephonenumber”)
What is the field name that returns the email address. I had assumed rs.fields(“emailaddress”)
The query
strSql = “Select name,telephoneNumber, ”
strSql = strSql & “From ‘LDAP://DC=ara,DC=local’ ”
strSql = strSql & “WHERE objectCategory=’Person’ ”
strSql = strSql & “AND objectClass = ‘User’ ”
strSql = strSql & “AND Company = ‘xyz co'”
works fine
but
strSql = “Select name,telephoneNumber, emailaddress ”
strSql = strSql & “From ‘LDAP://DC=ara,DC=local’ ”
strSql = strSql & “WHERE objectCategory=’Person’ ”
strSql = strSql & “AND objectClass = ‘User’ ”
strSql = strSql & “AND Company = ‘xyz co'”
stops dead.
that leads me to believe that emailaddress is the wrong field name.
Can I be pointed to a valid list of field names within AD
Thanks in advance
Geof