I'm creating my own form to allow a user to change their password in a Microsoft Access database with user-level security, an *.mdb file. When I run the following VBA code, I get error 3293: Syntax error in ALTER TABLE statement.
CurrentDb().Execute "ALTER USER user PASSWORD NewPassword OldPassword"
I'm following the instructions found in the documentation. How do we change a password through VBA?
CurrentDb.Execute
is a DAO method, butALTER USER
must be executed from ADO.CurrentProject.Connection.Execute
is an ADO method.