Database password in Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What's wrong with my code. It isn't working. I'm trying to set a database
password using code.

DoCmd.GoToControl "password"
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdSetDatabasePassword

DoCmd.RunCommand acCmdPaste

When I run it, the password box comes up for me to manually set it. The code
is suppose to copy the password from a control box and then paste???

Help
 
Gak!

Prompt for the new password using the Input() function, then save it
using the NewPassword() method.

HTH,
TC
 
Back
Top