-
There must be someone who knows this.
I have a database with an MDW file.
I am trying to write code to add a new user to this database.
The code to add a new user is as follows.
Code:
'\\Set catalog active connection to the DB connection
cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=M:\NewMIS.mdb;" & _
"Jet OLEDB:System database=M:\System.mdw;" & _
"User ID=WIPWOSAdmin;Password=goldfish;"
'\\Append the user to the database
cat.Users.Append txtUserName, txtPassword
This is how it is explained on the Microsoft site.
Every time it reaches the cat.Users.append part, a run time error '3001' is caused Description: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Can anbody explain why this is happening.
I don't really want to have to revert back to DAO to solve this.
-
The first argument to the Append method should be a new user object and not a string.
-