Database password in Code

K

KJJ

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
 
T

TC

Gak!

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

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top