I am trying to add new users using code so that the internal Access tables match my own Users table (tblUsers). I use the tblUsers to hold Job Title, Fullname, Tel no etc and use this in reports and merges.
The code I use is...
Set adoUser = New ADOX.User
adoUser.Name = sUserID
If Not sPassword = "" Then
adoUser.ChangePassword "", sPassword
End If
adoCat.Users.Append adoUser
adoUser.Groups.Append "Users"
adoUser.Groups.Append "Admins"
but it fails at the Append bit.
The Err.Description is
"Object or provider is not capable of performing requested operation."
but I can't see anything wrong with the code.
Any thoughts.
The code I use is...
Set adoUser = New ADOX.User
adoUser.Name = sUserID
If Not sPassword = "" Then
adoUser.ChangePassword "", sPassword
End If
adoCat.Users.Append adoUser
adoUser.Groups.Append "Users"
adoUser.Groups.Append "Admins"
but it fails at the Append bit.
The Err.Description is
"Object or provider is not capable of performing requested operation."
but I can't see anything wrong with the code.
Any thoughts.