Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change the database password using VBA code? 1

Status
Not open for further replies.

sandman2869

Technical User
Dec 19, 2001
15
0
0
US
Hi all,
I am currently working on a project with access 97 and I want to be able to change the database password (old password being provided) using code. I am hoping that someone will be able to help me as I am VERY new to access and all help is appreciated.


Thanks in advance,

Leon
 
Try this...

Dim db As Database

Set db = OpenDatabase("c:\directory\dbname.mdb")

db.NewPassword "OldPassword", "NewPassword"
 
Pezamystik,
Thank you, the code works perfectly :)
You wouldn't also happen to know how to create a user account would you? If not, I appreciate the great help you have already provided.


Thanks again,


Leon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top