Set another databases password using code?

Matrix_zero

Registered User.
Local time
Yesterday, 19:28
Joined
Jan 26, 2005
Messages
64
Ok, i have just created a new database for storing my data... that is if it doesn't already exist, using the createdatabase method. Now i would like to set that database password to "12345". Is therw a way i can do that automatically or using code with out actually going to that database and selecting tools, security, set database password?
 
nevermind

nevermind, i found it... incase anyone else wanted to know, here it is using a DAO 3.6 Reference

Dim Db As Database
Set Db = OpenDatabase(CurrentProject.Path & "Data.MDB", True, False)
Db.NewPassword "", "12345"
Db.Close
 
Don't trust the Access database password. There are many freeware utilities that can instantaneously reveal Access database passwords.
 

Users who are viewing this thread

Back
Top Bottom