Access supports CREATE USER as a DDL statement, but unfortunately it will not work in all contexts. In particular, this will not work if we try to run it from
- The query constructor is in access itself
- connecting the DAO to the database or
- ODBC connection to the database.
It will only work when launched from an OLEDB connection to the database. This can be done from VBA code in the Access database itself using an object CurrentProject.Connection, for example:
CurrentProject.Connection.Execute _
"CREATE USER newuser newpassword newpid"
(Note that there are no commas between the three arguments in the CREATE USER statement.)
source
share