How do you change user password for a separate Access database than you are working in?

255 pts.
Tags:
Access 2003
Access 2003 Security
Access Database
VBA
I've built a database (Production) with user level security on it.  I also have built a smaller database (Login) so I don't have to use Access' login.  I'm trying to figure out if there is a way to change the user password in the Production database FROM the Login database.  I've been working with the following code and trying to make it work on another database other than the CurrentDb(DBEngine(0)):





 

I hope I explained that well.  Let me know what you think.

Thanks!



Software/Hardware used:
MS Access, Windows XP, VBA
ASKED: January 28, 2011  4:00 PM
UPDATED: January 28, 2011  4:08 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • McNitro
    Argh, I can never post things right...hopefully this works now.
    Public Sub ChangePassword(strUser as String, strOldPassword as String, strNewPassword as String)
    
    Dim wrk as DAO.Workspace
    Dim usr as DAO.User
    
    Set wrk = DBEngine(0)
    Set usr = wrk.Users(strUser)
    
    'Change the password
    usr.NewPassword strOldPassword, strNewPassword
    
    Set usr = Nothing
    Set wrk = Nothing
    
    End Sub
    255 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following